Free resources · Getting started
How to use Claude Code: a beginner tutorial with your first real task
How to use Claude Code: a step-by-step tutorial for people who have never opened a terminal. Install it on a Mac or Windows, start it in a practice folder, and make a real file.
What is Claude Code?
You point Claude Code at a folder on your computer, and Claude reads the files in it, makes new ones and changes them while you watch.
You work with it in a terminal: a plain text window where you type instructions to your computer instead of clicking.
What do you need before you start?
You need a paid Claude plan: the free claude.ai plan does not include Claude Code.
How do you open a terminal?
On a Mac:
- Press Command and the Space bar together.
- Type Terminal and press Return.
On Windows:
- Press the Windows key and X together.
- Choose Terminal or Windows PowerShell.
- Check that the line in the new window starts with PS.
If it begins with C:\ and no PS, you are in Command Prompt, which needs a different install command. Close it, press the Windows key, type PowerShell, and press Enter to open PowerShell directly.
- To paste into the terminal, press Command and V on a Mac. In PowerShell, press Control and V, or right-click.
How do you install Claude Code?
Copy the line for your computer, paste it into the terminal, and press Return.
On a Mac:
curl -fsSL https://claude.ai/install.sh | bash
On Windows, in PowerShell:
irm https://claude.ai/install.ps1 | iex
The installer "shows no progress while Claude Code downloads". When it succeeds, the output includes the words Claude Code successfully installed!.
How do you check that it worked?
Open a new terminal window: on a Mac, press Command and N in Terminal; on Windows, open Terminal again from the Windows key and X menu. Type this and press Return:
claude --version
If it worked, the command prints a version number followed by (Claude Code).
If you get command not found: claude on a Mac, Claude Code is installed but your terminal cannot find it. To fix it, run the line your installer printed under Setup notes. On a Mac it is usually this one; paste it into the new window and press Return:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
On Windows the message is 'claude' is not recognized. Close PowerShell, open a new window, and try claude again.
Then close every terminal window, open one new one, and use only that one for the rest of the page. Run the check again in it:
claude --version
How do you make a practice folder?
Give Claude Code a folder made just for practice. Paste these two lines, pressing Return after each:
mkdir claude-practice cd claude-practice
Now open that folder in a normal window. On a Mac, type this and press Return; a Finder window opens on the folder:
open .
On Windows, this opens it in File Explorer:
explorer .
How do you start Claude Code and sign in?
Still inside claude-practice, type:
claude
The first time, a few setup screens come before the main one. Move between answers with the Up and Down arrows, and press Return to choose. On the login method screen, choose Claude account with subscription, and Claude Code opens your web browser on a sign-in page. Sign in with the same account you use for Claude chat, then come back to the terminal.
What is the folder safety question, and how do you answer it?
Next comes a safety question that starts "Quick safety check: Is this a project you created or one you trust?". It has two answers, Yes, I trust this folder and No, exit.
Check where the ❯ arrow points before you press anything. On our run it started on No, exit, and pressing Return there closes Claude Code. If it points at No, exit, press the Down arrow once so it points at Yes, I trust this folder, then press Return. You made the practice folder yourself and it is empty, so trusting it is safe.
How do you give Claude its first real task?
Here is the request we used. Type it and press Return:
Create a file called todo.txt with five things I need to do this week, one per line: pay the electricity bill, call the dentist, buy Sam a gift, renew my passport, clean the garage.
Claude Code usually starts in auto mode, where it makes files without asking. If you are in manual mode, Claude first asks whether it may create todo.txt. Press Return to choose Yes.
On our screen, in auto mode, the work showed up as two lines:
⏺ Write(todo.txt) ⎿ Wrote 5 lines to todo.txt
To repeat this on your own work, swap in your own five chores, and leave out anything private. To use it on your own files later, cd into that folder and type claude. Trust only folders whose contents you know.
Where is the full answer?
- Is Claude Code free
- Claude Code changelog
- Node js for Claude Code
- How does Claude Code work?
- How to use Claude Code in VS Code
- Which Claude app you need
- Claude Code best practices
- Context engineering vs prompt engineering
- How to use Claude AI
- Claude Code skills
- CLAUDE.md best practices
- Build an app with AI
- Claude Cowork
Check that you can do it on your own
In the Finder or File Explorer window, todo.txt is now there. (Windows may hide the .txt ending and show it as just todo.) Double-click it to open it in TextEdit on a Mac or Notepad on Windows. Or, in a new terminal window, type cd claude-practice and press Return, then type:
cat todo.txt
You should see exactly five lines, in the order you asked: pay the electricity bill, call the dentist, buy Sam a gift, renew my passport, clean the garage.