Handy shortcut when you mistype a command name, in the example below I mistype "rm" as "em"
em /var/log/path/really-long-file-name.log
em: command not found
$ rm !:1
rm /var/log/path/really-long-file-name.log
Repeating the last command, most of the time you would just use the arrow up key however not all keyboards have arrow keys
$ echo "Hello World!"
Hello World!
$ !!
echo "Hello World!"
Hello World!
Handy shortcut for when you forget to prepend a command with sudo
$ apt-get install sshd
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
$ sudo !!
sudo apt-get install sshd
[sudo] password for user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
If you want to reuse the last argument from the previous command
$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 desktop
$ vi !$
vi /etc/hosts
Cleaning up the terminal
Clear the screen
$clear
Ctrl + l
Stop the standard out of a program from displaying in your terminal but keep the program executing.
Ctrl + s
Ctrl + q
Bash tab completion works with wild cards
$ rm *.txt <TAB>