by Jonny nov and Claude ai macOS Terminal Cheat Sheet: Every Command With a Mental Model published: true description: A structured, level-by-level guide to macOS Terminal with mental models for every command. Navigation, files, Python, Git, processes, and Homebrew — all in one place. tags: terminal, macos, beginners, productivity cover_image:

macOS Terminal Cheat Sheet

Every command with a mental model — so it actually sticks.

By @Dav23Jonn76

Level 1 — Core Navigation


If you've ever stared at a terminal window and felt completely lost — this is for you.

Most terminal guides dump 50 commands on you with zero context. This one is different. Every command has a Mental Model — a one-liner that explains why it works, not just what it does. That's the thing that actually makes it stick.


Command What It Does Mental Model
pwd Print current directory GPS location
ls List files/folders Look around
ls -la List all including hidden X-ray vision
cd folder Enter folder Drive into street
cd .. Go back one level Reverse
cd ~ Go to home directory Go home
clear Clear screen Clean windshield

Level 1 — File & Folder Control

Command What It Does Mental Model
mkdir folder Create folder Build garage
touch file.txt Create empty file Blank paper
cp file1 file2 Copy file Duplicate
mv file1 file2 Move / Rename Relocate cargo
rm file.txt Delete file Trash
rm -r folder Delete folder recursively Bulldozer 🚨
open . Open folder in Finder Open in GUI

⚠️ Warning: rm has no undo. There's no trash. It's gone. Double-check before you hit Enter.


Level 1 — Read & Write Files

Command What It Does Mental Model
cat file.txt Print file contents Read aloud
less file.txt Scroll through file Paged reading
head -n 10 file First 10 lines Read the cover
tail -n 10 file Last 10 lines Read last page
echo "hi" > file Write to file Overwrite notepad
echo "hi" >> file Append to file Add to notepad
nano file.txt Edit file in terminal Open text editor

Level 1 — Python Basics

Command What It Does Mental Model
python3 script.py Run a script Activate robot
python3 Open REPL Talk to robot live
pip install pkg Install package Add a skill
pip list List packages Inventory skills
pip freeze Export installed pkgs Print manifest
python3 -m venv env Create virtual env Build sandbox
source env/bin/activate Activate venv Enter sandbox