The Terminal & Claude Code
The hardest concept: three interfaces, one screen. Claude Code is a terminal inside your terminal.
The Terminal: A Text-Based Finder
Every computer has a terminal. On Mac it is called Terminal, on Windows it is Command Prompt or PowerShell. It looks like a black box with a blinking cursor. And it does the exact same thing as Finder or File Explorer. It lets you navigate folders, open files, move things around. Just text instead of pictures.
Here are the four commands that cover 80% of what you will ever do:
lslists what is in the current folder (like opening a Finder window)cd folder-namemoves into a folder (like double-clicking it)cd ..goes back up one level (like clicking the back arrow)pwdprints where you are right now (like looking at the path bar in Finder)
Four commands. That is all you need to navigate your file system.
Terminal Simulator
The terminal is not a separate universe from Finder. They are looking at the same files and folders. If you create a file in the terminal, it shows up in Finder. If you drag a file into a folder in Finder, the terminal sees it. Two views of the same thing.
File Paths: Every File Has an Address
Every file on your computer has an address called a path. It works like a street address, telling you exactly where something is by listing every folder you would pass through to get there.
/Users/you/Documents/my-project/index.html
Read it left to right: start at the root (/), go into Users, then you, then Documents, then my-project, and there is your file index.html. Each / is a folder boundary.
URLs work the same way. When you visit https://example.com/blog/post-1, everything after the domain is a path: /blog/post-1. The server looks inside its blog folder for something called post-1. Same concept, different computer.
When someone says "the file is at src/components/Button.tsx," they are giving you directions: start in the src folder, go into components, and the file is Button.tsx. A path is just directions.
IDEs: Your Workshop
An IDE (Integrated Development Environment) is where developers actually work. The two most popular ones are VS Code (free, from Microsoft) and Cursor (a fork of VS Code with AI built in). They look almost identical.
An IDE combines three things you already know into one window:
- A file browser (the left sidebar). It is Finder. Same folders, same files. You click to open them.
- A text editor (the main area). It is where you read and write code. Think of it as a very fancy Notepad with color-coding.
- A terminal (the bottom panel). It is the exact same terminal from the previous section, just embedded in the window.
There is nothing new here. The file browser IS Finder. The terminal IS the same terminal. The IDE just puts them side by side so you don't have to switch between apps. That is the whole value. Convenience, not magic.
The #1 Confusion: What Am I Looking At?
This is the hardest part of this entire curriculum. Learners consistently get confused about which tool they are in. Let's name the confusion so it loses its power.
You are going to have three things open that all look similar:
- The Mac Terminal app, a standalone black window with a blinking cursor. You type commands here.
- VS Code, a code editor with a file browser on the left, code in the middle, and a terminal panel at the bottom.
- Claude Code, an AI that runs INSIDE a terminal. It looks like a terminal. It is inside your terminal.
Here is the key: Claude Code is a terminal inside your terminal. When you launch Claude Code, the terminal you were using transforms. It still looks like a terminal (black background, text, blinking cursor) but now you are talking to an AI instead of talking to your computer's operating system.
The most common confusion: "Where is the code being written?" When Claude Code edits a file, it is editing a real file on your computer. The same file you can see in VS Code's file browser, the same file that exists in Finder. Claude Code does not have its own hidden workspace. It is operating directly on your actual project files.
Claude Code: AI in the Terminal
Claude Code is an AI that runs in the terminal. Not in a chat window, not in a sidebar. In the same terminal you just learned about. You type a description of what you want, and Claude Code reads your files, writes code, runs commands, and commits changes. It is operating directly on your project.
This is different from AI assistants built into editors like Cursor. The distinction matters:
- Cursor AI is like having an assistant look over your shoulder while you type. It suggests the next line, autocompletes, answers questions in a sidebar. You are still driving.
- Claude Code is like handing the keyboard to the assistant. You describe what you want, and it does the work. It reads files, makes edits across multiple files, runs the build to check for errors, fixes what breaks, and commits the result.
Both are useful. They are just different modes. Cursor is great when you want to stay hands-on. Claude Code is great when you want to describe a task and let AI handle the execution.
"Why not just use the terminal directly?" Because the terminal only understands specific commands. You have to know the exact syntax. Claude Code lets you describe what you want in plain English, and it figures out which commands to run, which files to edit, and in what order. It is the difference between driving a car yourself and telling a driver where you want to go.
Imagine you want to add a new page to a website. With Cursor, you would create the file yourself, start typing, and let AI autocomplete each line. With Claude Code, you would type "create a new About page that matches the style of the Home page" and it would create the file, write the content, match the existing design patterns, and verify it builds correctly.
Escape vs. Ctrl+C: Two Ways to Stop
When working in the terminal and Claude Code, you need to know two different "stop" commands:
- Escape cancels the current input or interrupts what Claude is doing. It is the "nevermind" button inside Claude Code.
- Ctrl+C kills whatever process is running in the regular terminal. If a command is stuck or taking too long, Ctrl+C stops it.
The distinction: Escape is for Claude Code. Ctrl+C is for the terminal. If you press Ctrl+C inside Claude Code, it may exit Claude Code entirely and drop you back to the regular terminal. If that happens, just type claude to start it again.
When in doubt: Escape first (gentle stop inside Claude Code), Ctrl+C second (hard stop that exits to the terminal). You will build the muscle memory quickly, but knowing the distinction upfront prevents the panic of "where did my AI go?"
Setting Up Your Environment
Getting set up is simpler than you would expect:
- Install VS Code (or Cursor). Download it, drag it to Applications, done.
- Open a folder. File > Open Folder. Pick your project. The file browser on the left now shows everything in that project.
- Open the terminal. View > Terminal (or press
Ctrl+`). A terminal panel appears at the bottom. You are ready.
That is the full setup. You now have a file browser, a text editor, and a terminal, all in one window. From here you can navigate files, read code, run commands, and (once installed) use Claude Code.
You must type every command yourself. Do not copy-paste from these lessons into the terminal. The act of typing builds muscle memory and forces you to read what you are typing. Copy-paste feels faster but teaches nothing. When something goes wrong (and it will), you will not know what you typed or why. Type it. Every time.
Why This Matters
Every tool in this curriculum builds on what is in this lesson. You cannot use Claude Code without a terminal. You cannot navigate a codebase without understanding file paths. You cannot work on a project without an IDE (or at least a text editor and a terminal side by side).
These are the physical tools. The keyboard, the workbench, the workshop. Everything else (code, repos, APIs, databases, cloud hosting) happens inside these tools. If the terminal and IDE feel comfortable, everything that follows will make more sense.
Further Reading
Get started:
- VS Code: Getting Started: official walkthrough for setting up VS Code
- The Linux Command Line for Beginners: terminal basics that apply to Mac and Linux alike
- Cursor: the AI-native code editor (fork of VS Code)
Go deeper:
- Claude Code Documentation: official guide to installing and using Claude Code
- VS Code: Integrated Terminal: everything about the built-in terminal