You've been told to "just open a terminal" and "run this command." Maybe you've done it once and felt like a hacker — or stared at a black box and closed it. This is the missing piece between using AI and actually building with it.
The terminal is just a text window where you type commands and your computer types back. It's been around longer than Windows, longer than the Mac mouse — and almost every powerful dev tool still lives there.
Imagine your computer as a very capable assistant who only speaks one language: short commands. Every app on your Mac has a graphical face (windows, buttons, menus), but underneath, your computer takes orders as text. The terminal is the door to that text-based conversation.
A graphical app says: "Click here, drag this, drop it there." The terminal says: "Tell me exactly what you want, and I'll do it." Slower to learn, way faster to use once you know a handful of commands.
Terminal — the app (the window itself). On Mac, it's literally called "Terminal." Shell — the language inside the window that interprets your commands (on modern Mac, this is zsh; older Macs and most Linux servers use bash). Prompt — the little symbol (usually $ or %) that tells you the shell is ready for your next command.
$ and others %
Different shells use different prompt characters. $ = bash and most Unix shells (the default on Mac until 2019). % = zsh (the default on every modern Mac since macOS Catalina). Same idea, different cosmetic character — and for everything in this module, they behave identically.
Important when copy-pasting from tutorials: the $ or % is the prompt the shell shows you — don't type it. Only type what comes after.
You don't need the terminal to do your job. But almost every interesting tool, tutorial, and AI workflow on the internet assumes you can open one and run a couple commands. Learning the basics unlocks:
If you've used Claude.ai or Claude Desktop and they've worked fine — fair question. Why bother with the terminal at all? Here's the honest answer: there are three different surfaces for Claude, and each one unlocks more than the last. The terminal sits at the powerful end.
1. Claude Chat — claude.ai in your browser, or the Claude Desktop chat app. Pure conversation. The thing you've probably already used.
2. Claude Code Desktop (GUI) — Anthropic's agentic coding tool with a desktop app interface (Chat / Cowork / Code tabs, sessions sidebar, routines builder).
3. Claude Code Terminal (CLI) — the same Claude Code, but run via claude in your terminal.
Same Claude model under all three. The differences are about what each interface lets Claude do and where it fits in your workflow.
Each surface gives Claude progressively more access to your work.
Same model. Three levels of "permission" to actually do stuff for you.
| Capability | Claude Chat | Code Desktop (GUI) | Code Terminal (CLI) |
|---|---|---|---|
| Foundation | |||
| Same Claude model | Yes | Yes | Yes |
| Conversation / chat | Native | Yes | Yes |
| Memory across sessions | Basic | Full | Full |
| Files & your computer | |||
| Read & write files on your computer | Upload only | Directly | Directly |
| Edit existing code or docs | Can't | Yes | Yes |
| Run shell commands | Can't | Yes | Yes |
| Extensibility | |||
| MCP servers | Remote only | All MCPs | All MCPs |
| Skills, hooks, plugins | No | Yes | Yes |
| CLAUDE.md project context | No | Yes | Yes |
| Routines / scheduled tasks | No | UI builder | Config-based |
| Workflow fit | |||
| Browsing past sessions visually | Yes | Sidebar | Limited |
| Working inside a project folder | N/A | Navigate via UI | cd && claude |
| Compose with shell tools (pipes, scripts) | No | No | Native |
| Multiple parallel sessions | Per tab | One | Many |
| Setup | |||
| Friction to get started | None | Install app | Install Node + CLI |
| Easy for non-engineers | Yes | Yes | Learning curve |
Start in Claude Chat — see what's possible, get comfortable. Move to Code Desktop when you want Claude to actually do things to your files (the moment you think "I wish I could just point Claude at this folder"). Move to Code Terminal when you're working in a project folder daily and want the lowest-friction version. Most people end up using all three — picking based on the task.
Chat trades capability for accessibility. Code Desktop trades speed for discoverability. Code Terminal trades onboarding for composability. Same Claude model under all three — the interface decides what Claude can actually do for you.
There are six commands that get you 80% of the way to "I can follow any tutorial on the internet." Learn them once, and the terminal stops looking scary.
On Mac: press ⌘ + Space, type "Terminal," hit Enter. A black (or white) window opens with a prompt like ~ % or ~ $. That's the terminal. Everything below assumes you've got that window open.
Type each command, hit Enter, see what happens. You cannot break your computer doing the things below.
pwd and press Enterls to see your home folder contentscd Documents, then pwd to confirm you movedcd terminal-test into it--help flag that prints what it does and how to use it. Use it when you forget syntax.--help to any tool nameTab autocompletes filenames and folders — start typing, hit Tab. ↑ arrow brings back your previous command. Ctrl+C cancels whatever's currently running (use it any time you feel stuck).
Six commands. Memorize them, use them five times in your real terminal, and you've cleared the biggest hurdle. You don't need more right now — the rest of the terminal is just chains and combinations of stuff like this.
Half of "knowing the terminal" is reading what comes back. Errors look scary; most of them have only a few flavors. Once you can name the flavor, you can fix it.
The terminal shows a prompt when it's ready for a new command. It usually looks like one of:
yourname@MacBook ~ % — modern Mac (zsh)yourname@MacBook ~ $ — older Mac or Linux (bash)The bit before the % or $ tells you context: your username, your machine name, and where you are in the file system (~ = home). The cursor blinks after the prompt — that's where your typing goes.
Every command returns an exit code when it finishes. You don't see it directly, but it determines the "vibe" of the next prompt:
If you ever want to see the exit code, run echo $? right after a command — it prints the number.
Memorize these. Each one tells you exactly what's wrong:
command not found — the tool isn't installed (or isn't on your PATH). Most often you need to install it via Homebrew.No such file or directory — you typed a filename or path that doesn't exist. Usually a typo, wrong folder, or a missing file.Permission denied — the file exists but you can't access it. Sometimes you need sudo (admin mode), but usually you're trying to write to a system folder you shouldn't touch.zsh: parse error or syntax error — you mistyped the command. Look for missing quotes or unbalanced brackets.Errors that look terrifying are almost always boring. Copy the entire error message (it's just text) into Claude Desktop or Claude Code with the question "what does this mean and how do I fix it?" You'll have an answer in seconds. This works embarrassingly well.
The terminal isn't trying to be cryptic. It's just terse. Every error message is short, factual, and a clue. The faster you stop seeing them as failures and start seeing them as diagnostic information, the faster the terminal becomes friendly.
A package manager is an "App Store for command-line tools." Once you have one installed, getting any developer tool is a single line. On Mac, the de facto package manager is Homebrew. This is the most important install you'll do all year.
You're used to installing apps from the Mac App Store or by dragging a .dmg into your Applications folder. Command-line tools work differently — they live in special system folders, and you usually install them via a single terminal command.
A package manager is a program that handles installing, updating, and removing command-line tools for you. It knows where they should live, sorts out the dependencies (when tool A needs tool B), and keeps a clean record of what's on your machine.
You'll hear about a few:
Different languages, same idea: "install this for me."
Almost every modern dev tool you'd want — Node, Python, Git, Ripgrep, jq, gh, claude, you name it — installs via Homebrew with one line. Setting up Homebrew is a one-time tax. After that, every future tool is a one-line install.
Open the terminal. Paste this command. Hit Enter:
It'll ask for your Mac password (the one you use to log in). Type it — the cursor won't move as you type, that's normal. Press Enter.
Wait 3–5 minutes. When it's done, it prints two "Next steps" commands at the very bottom of the output. Run those two commands — they finish setting things up so your terminal knows where Homebrew lives. Copy/paste exactly what's on your screen.
Run:
If you see a version number (e.g., Homebrew 4.4.0), you're good. If you see command not found: brew, the "Next steps" commands didn't run. Scroll back up in your terminal, find those two lines, paste them in, and try again.
Now that you've got Homebrew, let's install something fun and actually useful. Tree is a tool that visualizes folder structures — way nicer than ls.
Takes about 5 seconds. Then try it:
You'll see your home folder structure as a beautiful indented tree. Congrats — you just used a package manager, installed a tool, and ran it. That's the loop you'll repeat hundreds of times.
brew upgrade — updates all the tools you've installed via Homebrew to their latest versions. Run this every few weeks.brew uninstall <tool> — removes a tool you don't want anymore. Clean.You now have a terminal, six commands, the ability to read what comes back, and a package manager. That's the entire foundation. The next module — MCP Basics — assumes everything in this module and shows you how to wire up Claude to your tools.
Other places to go from here:
npm install -g @anthropic-ai/claude-code (after you've installed Node via brew install node)brew install ghbrew install jqYou don't need any of these today. But now you know how.
Five quick questions. Click an answer to see if you've got it.
pwd and hit Enter. What does the terminal print?zsh: command not found: tree. What does this mean?