Keystrokes
Keystrokes: Keyboard Shortcuts at the Prompt, History Tricks: !!, !$ and Ctrl+R, Jumping Around: cd -, pushd and **.
Updated
- Keyboard Shortcuts at the Prompt (Apprentice): Ctrl+A and Ctrl+E jump to the start and end of the command line, Alt+B and Alt+F move a word at a time, Ctrl+W and Ctrl+U delete a word or the line, and Alt+. brings back the last command's last argument.
- History Tricks: !!, !$ and Ctrl+R (Journeyman): !! runs the last command again and !$ reuses its last argument, sudo !! repeats a command that needed sudo, Ctrl+R steps back through older matches, and four lines in ~/.bashrc keep a longer history that every terminal adds to.
- Jumping Around: cd -, pushd and ** (Journeyman): cd - switches between two folders, pushd and popd keep a stack of folders to come back to, ** reaches into every folder below once globstar is on, and CDPATH lets cd find a project's folders from anywhere.