Skip to content

Terminal Basics for Normal Humans

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):

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

Terminal window
# You typed this 5 minutes ago:
npm install
# Press Up arrow → it appears again!
# Press Enter to run it again

Pro alternatives (for when you want to look fancy):

  • Ctrl+P: Same as Up arrow (Previous command)

  • Ctrl+N: Same as Down arrow (Next command)

Ctrl+R = Reverse search (game-changer!)

Terminal window
# 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 first

Real-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!

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

Terminal window
# 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 words

Ctrl+K: Kill (delete) everything from cursor to end of line

Terminal window
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

Terminal window
git commit -m "This message is way too long and rambling"
cursor here
# Press Ctrl+U → deletes everything before cursor
# Useful for starting over

Ctrl+W: Delete the word before cursor

Terminal window
git commit -m "typo"
# Press Ctrl+W → deletes "typo"

Ctrl+C: Stop/cancel the current command (if something’s stuck)

Terminal window
# 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 appear

Ctrl+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

Terminal window
cd ~/Doc[TAB]
# Becomes: cd ~/Documents/
git add my-rea[TAB]
# Becomes: git add my-readme.md
ShortcutWhat It DoesWhen to Use It
↑ / ↓Browse command historyRunning same commands repeatedly
Ctrl+RSearch old commands”What was that command I ran yesterday?”
Option+ClickJump cursor to positionQuick typo fixes
Ctrl+A / Ctrl+EJump to start/end of lineEditing long commands
Option+← / →Jump by wordNavigating medium commands
Ctrl+KDelete to end of lineTrimming end of command
Ctrl+UDelete to start of lineStarting over
Ctrl+CCancel current commandSomething’s stuck or wrong
Ctrl+LClear screenClean up clutter
TabAuto-completeFaster 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 paths

Pro 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.

Your Mac’s terminal has always been powerful - here are things you could already do:

Terminal window
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 now
Terminal window
python script.py # Run Python code
npm start # Start a web app
open file.html # Open file in browser
Terminal window
git status # What changed?
git add . # Stage changes
git commit -m "msg" # Save snapshot
git push # Upload to GitHub

Key insight: The terminal always had these powers. Claude Code just gives you an AI copilot that knows how to use them all.