Skip to content

Free PDF, 10 pages

6 terminal shortcuts that end the retyping

Get it in your inbox

Confirm your email and the PDF arrives right away. You also get the weekly email; one click unsubscribes.

The signup opens in a few days.

You get our emails until you unsubscribe. Kit sends them; how your address is handled: Privacy.

Your terminal writes down every command you type. Most people still retype them. These six shortcuts bring them back, and the last page is a one-screen cheat sheet you can keep next to your keyboard.

What is inside

  • ctrl+r searches everything you ever typed
  • sudo !! reruns the last command as admin
  • cd - jumps back to the directory you were just in
  • ctrl+a / ctrl+e start and end of the line, no arrow key holding
  • !$ reuses the last word of the previous command
  • ^old^new fixes a typo in the last command and runs it again

Who it is for

Anyone who opens a terminal every day and still holds the arrow key. Works in zsh (the Mac default) and bash.

Page 1 of the cheat sheetPage 2 of the cheat sheetPage 3 of the cheat sheet