Linux

Linux

Linux is the standard OS for deploying software today.

Tips and Tricks

SSH Agent Forwarding

This is useful if you use another machine on the network to do "heavier" work

Setting up SSH agent forwarding

Modify the ~/.ssh/config file. If one doesn't exist, you can create it by entering touch ~/.ssh/config

Enter the following example in the config file

  Host [example.com]
    ForwardAgent yes

Ensure that your /etc/ssh/config file is set up for forwarding

Your config file should look like this

# ForwardAgent no
  Host *
    SendEnv LANG LC_*

Notice that the ForwardAgent no line is commented out with the # in front of it

Executing the commands

  1. Ensure that your ssh-key is loaded
ssh-add [your key location]
  1. SSH to the machine that you have set up
ssh -A [username]@[example.com]

Memory

Show memory slots being used

dmidecode -t memory

Extract all RAR files in a directory

for file in *.rar; do unrar e "$file"; done

Utilities

tmux

tmux is a terminal multiplexer. It lets you switch easily between several programs in one terminal, detach them (they keep running in the background) and reattach them to a different terminal.