Claude Code Terminal Basics

Claude Code lives inside the terminal, a text window where you type instructions to your computer instead of clicking icons. Many beginners feel nervous about that plain window. A small set of commands covers nearly everything you need, and Claude Code handles the complicated work once it starts.

What the Terminal Is

Picture the terminal as a text-message chat with your computer. You send a short message, and the computer replies with a result or an error. No menus or buttons exist. Every action starts with a typed word.

YOU TYPE                         COMPUTER ANSWERS
---------                        ----------------
ls                      →        notes.txt  app.py  images
cd images               →        (moves into the images folder)
pwd                     →        /Users/maya/projects/images

The terminal has different names on each system. Mac users open Terminal. Windows users open PowerShell or Windows Terminal. Linux users open the terminal app from their application menu. Code editors such as VS Code include a built-in terminal panel too.

Folders and Paths

A folder holds files and other folders. A path is the written address of a folder or file, the same way a street address points to a house.

projects                    ← main folder
 ├── shop-website           ← one project
 │    ├── index.html
 │    ├── style.css
 │    └── scripts
 │         └── cart.js
 └── notes-app              ← another project
      └── app.py

Path to cart.js:  projects/shop-website/scripts/cart.js

The terminal always sits inside one folder at a time. That folder is the current folder. Claude Code reads and edits files inside the current folder, so the folder you choose before launching Claude Code decides what it can see.

Six Commands Worth Knowing

CommandWhat It DoesPlain Meaning
pwdPrints the current folder path"Where am I?"
lsLists files in the current folder"What is here?"
cd foldernameMoves into a folder"Go there."
cd ..Moves one folder up"Go back."
mkdir foldernameCreates a new folder"Make a space."
clearWipes the screen"Tidy up."

Windows PowerShell accepts all six commands. Older Windows Command Prompt uses dir instead of ls and cls instead of clear.

A Short Practice Session

Type each line below and press Enter. Watch how the answer changes after every move.

pwd
ls
mkdir practice-project
cd practice-project
pwd

The final pwd shows a path that ends with practice-project. The new folder is empty, which makes it a safe place to try Claude Code for the first time.

Where Claude Code Fits

Claude Code is a program you start from the terminal. Open the terminal, move into your project folder, and type claude. The assistant wakes up inside that folder and works there.

Open terminal
     ↓
cd practice-project
     ↓
claude
     ↓
[ Claude Code session starts inside practice-project ]

Launching from the wrong folder is the most common beginner mistake. A session started in your home folder can see far more files than you intend. A session started in the project folder sees only that project.

Habits That Save Time

Tab Completion

Type the first letters of a folder name and press the Tab key. The terminal completes the name for you. Tab prevents typos and speeds up every move.

Command History

Press the Up Arrow to bring back the previous command. Keep pressing to walk further back through older commands.

Cancel a Running Command

Press Ctrl+C when a command hangs or runs too long. The terminal stops the task and returns the prompt.

Names With Spaces

Wrap a folder name in quotes when it contains a space, such as cd "my first project". Quotes tell the terminal the words belong together.

Common Beginner Mistakes

  • Typing a command in the wrong folder and wondering why files are missing.
  • Forgetting that terminal names are often case-sensitive on Mac and Linux.
  • Closing the terminal window while a Claude Code session still runs.
  • Copying a command with an extra space or a hidden character from a web page.

Practice Ideas

Build confidence with three tiny exercises. Create a folder named sandbox and move into it. Add a second folder inside it and return with cd ... Print your location with pwd after each move. Ten minutes of this practice makes every later topic feel familiar. Mistakes cost nothing in an empty folder, and the terminal never judges a typo.

Key Points

  • The terminal is a text chat with your computer.
  • A path is the written address of a file or folder.
  • The commands pwd, ls, cd, mkdir, and clear handle most daily movement.
  • Claude Code works inside the folder where you launch it.
  • Tab completion, command history, and Ctrl+C make terminal work faster and calmer.