Command Recall and Line Control
The best command is one you've already typed. Terminal remembers everything, and in this module you'll learn to use that history as a memory extension. You'll also learn to navigate within a command line instantly—no more slowly arrow-keying through long commands character by character.
Terminal Remembers Everything
Every command you type is saved. Terminal keeps a history of hundreds (even thousands) of your past commands.
This means you never have to retype a command from scratch. You just find it in your history.
The Up Arrow
The simplest way to access your history:
Press the ↑ (up arrow) key
Your last command appears
Press ↑ again to go further back
Press ↓ to go forward in history
Press Enter to run the command you've found
Search Your History
If you remember part of a command but it was a long time ago:
Reverse Search
Start typing any part of a past command. Terminal finds it instantly.
Try it: Press Ctrl + R, then type cd. You'll see your most recent command containing "cd". Press Ctrl + R again to find older matches.
Key Takeaway
Never retype commands. Press ↑ to scroll through history, or Ctrl + R to search for any past command.