Table with the command I most often use and think are essential. Or some that are cool, but easy to forget/not so often used.
| ctrl+r | Search in bash history |
| ctrl+e | Go to the end of the line |
| ctrl+u | Cut the characters before the cursor |
| ctrl+y | Yank/paste, it can paste what you cut with ctrl+u |
| ctrl+shift+c | Copy the marked text |
| ctrl+shift+v | Paste the text from the previous command |
| ctrl+d | Close bash sessions, same as to type exit |
| !$ | Get the last argument from the previous command |
| !* | Get all the arguments from the previous command |
| history | Don’t add command to bash history. There is space in front of the command |
| disown -a && exit | Exit terminal, detach all background process, so they can run. Useful for long tasks. |
| fc | Open last command in editor. Fix very long one-liners if you mess them up. |
| ctrl+x+e | Compose command in the default editor and execute it on save. |
| curl ifconfig.me | Get your public IP from CLI. |
| very_long_command # label | Label long commands, so it it easier to find in history. Everything after # is not executed as it is bash comment. |
| rm !(*.foo|*.bar|*.html) | Remove all files except the ones with these extensions. |
| vim -x <FILENAME> | Encrypt file in vim. |
| man hier | Show filesystem hierarchy. |
| cat /etc/issue | Get distro name. |
| ps aux | grep [p]rocess-name | Find the process you are looking for, without showing the grep command itself. |