Terminal Basics for Normal Humans
What IS the Terminal?
Section titled “What IS the Terminal?”The honest truth: That black screen with green text from hacker movies? It’s just texting your computer instead of clicking buttons. That’s it. No magic, no hacking skills required.
Think of it like a restaurant:
-
Clicking around (GUI) = Looking at a menu with pictures, pointing at what you want
-
Using Terminal (CLI) = Texting your order directly to the kitchen
Both get you food. The text version is faster once you learn the “menu” (commands). And with Claude Code, you don’t even need to memorize the menu—Claude knows it for you.
Why Terminal feels scary (but isn’t):
-
Movies made it look like hacking
-
Mistakes feel permanent (they’re usually not—there’s usually an undo)
-
No pictures or buttons to guide you
-
The reframe: It’s just a very literal conversation. You ask, computer answers.
macOS Terminal location:
-
Applications → Utilities → Terminal
-
Or: Cmd+Space, type “terminal”, hit Enter
Terminal 101: Keyboard Shortcuts You’ll Actually Use
Section titled “Terminal 101: Keyboard Shortcuts You’ll Actually Use”Once Terminal is open, these keyboard tricks will make you feel like a pro (even if you’re not):
Navigating Command History
Section titled “Navigating Command History”The Up/Down arrow keys are your best friends:
-
Up Arrow (↑): Shows your previous command
-
Down Arrow (↓): Shows your next command (or returns to blank line)
-
Keep pressing Up to scroll through all your recent commands
# You typed this 5 minutes ago:npm install
# Press Up arrow → it appears again!# Press Enter to run it againPro alternatives (for when you want to look fancy):
-
Ctrl+P: Same as Up arrow (Previous command)
-
Ctrl+N: Same as Down arrow (Next command)
Finding Old Commands Fast
Section titled “Finding Old Commands Fast”Ctrl+R = Reverse search (game-changer!)
# Press Ctrl+R, then start typing part of an old command(reverse-i-search)`git`: git commit -m "Added dark mode"
# Keep pressing Ctrl+R to cycle through matches# Press Enter to run it, or Right Arrow to edit it firstReal-world example:
-
You ran a long command 2 hours ago
-
Press Ctrl+R, type
claude -
Finds:
claude --model sonnet(or whatever you ran) -
No need to remember or retype the whole thing!
Moving Around in a Line
Section titled “Moving Around in a Line”You typed a long command and spotted a typo at the beginning. Don’t delete everything!
Option+Click (the Mac way):
-
Hold Option key, then click anywhere in your text
-
Cursor jumps to that spot instantly
-
Notice your mouse cursor turns into a crosshair when you hold Option
Keyboard alternatives:
-
Ctrl+A: Jump to the start of the line
-
Ctrl+E: Jump to the End of the line
-
Option+Left Arrow: Jump back one word at a time
-
Option+Right Arrow: Jump forward one word at a time
# You typed:cd ~/Dcuments/my-project ^ # Oops, typo! Need to add 'o' in Documents
# Method 1: Hold Option, click between 'D' and 'c'# Method 2: Ctrl+A to go to start, then Option+Right to jump wordsEditing and Deleting
Section titled “Editing and Deleting”Ctrl+K: Kill (delete) everything from cursor to end of line
cd ~/Documents/wrong-folder/more-wrong/nope ↑ cursor here
# Press Ctrl+K → deletes "wrong-folder/more-wrong/nope"# Result: cd ~/Documents/Ctrl+U: Delete everything from cursor back to start
git commit -m "This message is way too long and rambling" ↑ cursor here
# Press Ctrl+U → deletes everything before cursor# Useful for starting overCtrl+W: Delete the word before cursor
git commit -m "typo" ↑
# Press Ctrl+W → deletes "typo"Other Life-Savers
Section titled “Other Life-Savers”Ctrl+C: Stop/cancel the current command (if something’s stuck)
# If a command is running forever or you made a mistake:npm install some-huge-package# Loading... Loading... (taking too long!)# Press Ctrl+C to abort^C # You'll see this appearCtrl+L: Clear the screen (same as typing clear)
-
Terminal getting cluttered? Ctrl+L gives you a fresh screen
-
(Your command history is still there - scroll up to see it)
Tab: Auto-complete file/folder names
cd ~/Doc[TAB]# Becomes: cd ~/Documents/
git add my-rea[TAB]# Becomes: git add my-readme.mdQuick Reference Card
Section titled “Quick Reference Card”| Shortcut | What It Does | When to Use It |
|---|---|---|
| ↑ / ↓ | Browse command history | Running same commands repeatedly |
| Ctrl+R | Search old commands | ”What was that command I ran yesterday?” |
| Option+Click | Jump cursor to position | Quick typo fixes |
| Ctrl+A / Ctrl+E | Jump to start/end of line | Editing long commands |
| Option+← / → | Jump by word | Navigating medium commands |
| Ctrl+K | Delete to end of line | Trimming end of command |
| Ctrl+U | Delete to start of line | Starting over |
| Ctrl+C | Cancel current command | Something’s stuck or wrong |
| Ctrl+L | Clear screen | Clean up clutter |
| Tab | Auto-complete | Faster typing, fewer typos |
The three you’ll use every session:
1. **Up Arrow** - recall last command
2. **Ctrl+C** - stop something
3. **Tab** - auto-complete pathsPro tip: You don’t need to memorize all of these! Start with Up Arrow and Tab. Add more as you feel the need for them.
What Could Terminal Do Pre-Claude Code?
Section titled “What Could Terminal Do Pre-Claude Code?”Your Mac’s terminal has always been powerful - here are things you could already do:
File Management (The Basics)
Section titled “File Management (The Basics)”pwd # Print Working Directory - "where am I?"# Output: /Users/yourname (shows your current location)
ls # List - "show me files here"# Output: Desktop Documents Downloads Pictures (your folders)
cd Documents # Change Directory - "go into this folder"pwd # Check where you are now# Output: /Users/yourname/Documents
mkdir my-project # Make Directory - "create new folder"ls # Check it was created# Output: You'll see my-project in the list nowRunning Programs
Section titled “Running Programs”python script.py # Run Python codenpm start # Start a web appopen file.html # Open file in browserGit (Version Control)
Section titled “Git (Version Control)”git status # What changed?git add . # Stage changesgit commit -m "msg" # Save snapshotgit push # Upload to GitHubKey insight: The terminal always had these powers. Claude Code just gives you an AI copilot that knows how to use them all.