rsync -v -a <source> <destination> - Backup. Can be done remotely.
Background Processing
Ctrl+z to suspend a process
bg - Restart most recent process in the background (% for a specific)
fg - Restart most recent process in the foreground (% for a specific)
kill <process> - Remove a process (-9 to force kill)
%<command>
%<process number>
<pid>
pkill <command> - Kill by name
jobs - Show running jobs
`Start a command in the background by ending it with &
nice -n [-20-19] <command> - Set priority
renice - n [-20-19] <command> - Reset priority
Setting up remote access on a server
Generate an SSH key on the local computer
Make sure there's an ~/.ssh folder in the remote computer with install -d -m 700 ~/.ssh
Copy your public key to the remote server's .ssh/authorized_keys folder with cat ~/.ssh/id_rsa.pub | ssh <USERNAME>@<IP-ADDRESS> 'cat >> ~/.ssh/authorized_keys'
SSH
ssh <username>@<domain>
end with logout
Communication
wall "message" - Send a message to all logged in users ("write all")
write username [tty] - Send messages to a specific user. Find out your tty with tty. Terminated by Ctrl-D.
talk username - Start a chat with a user. Can be remote.
Mounting a device
mkdir /mnt/sd # Make a folder to mount to
sudo mount /dev/mmcblk0p1 /mnt/sd # Mount the device to the folder
sudo umount /mnt/sd # Unmount the folder
Network
ping - Check if a computer is up
traceroute - Shows the path a packet took
nslookup <domain> - Show IP address
DNS Lookup
To look up all DNS records, use dig -t ANY example.com +noall +answer