Learn from scratch · Guide 1

Claude Code in your terminal

How to install it, how to start it and what to ask it the first time. Step by step, on Windows, Mac or Linux, even if you have never opened a terminal.

Commands checked in the official documentationOct 28, 2026Claude Code 2.1.312

Before you start

1

Open the terminal

Press the Windows key, type PowerShell and press Enter. A window opens with something like PS C:\Users\yourname>. You do not need to open it as administrator.

The terminal is a window where you type commands instead of clicking. To paste into it: right click or Ctrl + V.

2

Install Claude Code

Copy this command, paste it in the terminal and press Enter.

irm https://claude.ai/install.ps1 | iex

No progress bar shows while it downloads. Wait until the line to type appears again.

If you see "'irm' is not recognized as an internal or external command"

You are in CMD (the line starts with C:\ without PS). Open PowerShell as in step 1, or use this command, which is the CMD one:

curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

Optional: if you install Git for Windows, Claude can use Git Bash. Without it, it works the same, with PowerShell.

3

Check that it is installed

Close the terminal, open a new one and type:

claude --version

If a number appears, like 2.1.312 (Claude Code), you have it. If it says it does not recognize claude, see "If something fails" at the end.

4

Create a test folder

Claude works inside the folder you open it from. For the first time, an empty folder is best. Type these two commands, one after the other:

mkdir claude-test
cd claude-test

The first creates the folder and the second takes you inside.

5

Start it and sign in

claude

The first time it asks a few setup questions, like which colors you prefer. Choose what you like.

Then the browser opens so you can sign in with your Claude account. If it does not open by itself, copy the link shown in the terminal and paste it in the browser.

At the end it asks if you trust the files in that folder. Since you just created it, say yes.

6

Ask it something

You type like in a chat, in your own words and in your own language, and send it with Enter. Try one of these:

  • Create a file shopping-list.txt with what I need for a simple pasta dinner for 4 people.
  • Make me a simple web page with a 25-minute timer and tell me how to open it.
  • Explain which files are in this folder and what each one is for.

In recent versions it starts in auto mode: it does the task without asking your permission at each step, and another model checks in the background what it is about to do and stops anything risky. If you would rather it ask before every change, switch modes. You can see how right below.

To go one step further

Choose how much it asks you

Claude has five modes. They change only one thing: how much it does on its own before asking your permission. You switch with Shift + Tab while you use it, or when you start it with the command on each card.

Plan

It researches and proposes a plan. It touches nothing until you approve it.

claude --permission-mode plan

Best for big tasks and for your first times

Manual

It reads without asking, but it asks permission before almost any change or command.

claude --permission-mode manual

To learn by seeing every step it takes

Accept changes

It edits files and creates, moves or copies inside your folder without asking. For everything else, it asks.

claude --permission-mode acceptEdits

When you already trust what it does in that folder

Auto

It does everything without asking and another model checks each action in the background. This is the mode it starts in.

claude --permission-mode auto

The default. Good for everyday use

Skip permissions

It asks nothing and nobody checks. If it makes a mistake, or if a trick text fools it, it runs it anyway.

claude --dangerously-skip-permissions

Avoid it on your own computer. Only for isolated environments, like a virtual machine

Commands to start

You type them in the terminal instead of plain claude. You can combine them: claude -c --permission-mode plan.

claude

It opens Claude in the folder you are in.

The usual.

claude "explain what's in this folder"

It starts and asks that as soon as it opens.

To get straight to the point.

claude -c

It continues the last conversation in this folder.

You closed it and want to continue where you left off.

claude -r

It shows your earlier conversations so you can pick one.

To pick up something from another day.

claude -n "rome-trip"

It gives the conversation a name. You come back to it with claude -r "rome-trip".

Projects that last several days.

claude --model sonnet

It picks the model: sonnet, opus, haiku or fable. They do not all use your limit the same. Inside, /model shows them to you.

When you want to try another one.

claude -p "summarize this in 3 sentences: ..."

It answers in the terminal and closes, with no conversation.

A quick question.

claude --add-dir ../Downloads

It lets it work with another folder too.

When it needs files from somewhere else.

What I recommend

  • To startclaude as it is, in your test folder, and see what it does.
  • For something bigPlan mode. You read the plan, correct what you do not like and then accept it.
  • To continue another dayclaude -c, or give it a name with -n from the start.
  • Never--dangerously-skip-permissions on your everyday computer.

The basics to get around

EscStops Claude while it works. Useful if you see it going the wrong way.
Shift + TabSwitches mode while you use it: manual, accept changes, plan and auto. They are explained above.
/clearStarts a new conversation, from zero.
claude -cTyped when you open it, it continues the last conversation in that folder. Inside, /resume lets you pick an earlier one.
@filePoints to a specific file in what you ask. When you type @ it suggests the ones that are there.
/initCreates a CLAUDE.md file with notes about your project, which Claude reads every time you open it there.
/usageHow much of your plan limit you have used.
/helpThe list of all commands.
/exitQuit. Pressing Ctrl + C twice also works.

It updates itself, so you never have to reinstall it.

So you do not get fooled

  1. Copy the install command only from claude.ai or from the official documentation (code.claude.com). If an ad, a video or a message gives you another command or another download, do not trust it.
  2. Open it in specific folders, like the test one, and not in your whole user folder or the entire disk.
  3. Read what it asks before you say yes, especially if it wants to delete something or run a command you do not understand. You can ask it "what exactly does this do?" before you accept.
  4. Do not paste passwords or bank details into it.

If something fails

It says it does not recognize "claude", or "command not found"

Close the terminal and open a new one: the one you had open does not know about the installation. If it still fails, follow the "Fix your PATH" part of the official troubleshooting guide.

You see "The token '&&' is not a valid statement separator"

You pasted the CMD command into PowerShell. Use the PowerShell one from step 2.

It will not let me in, or it asks me to pay

Claude's free plan does not include Claude Code. You need Pro, Max, Team, Enterprise or a Console account.

Another error

Type claude doctor in the terminal: it checks the installation and tells you what is wrong and how to fix it. If it still does not make sense, ask me.

Was this helpful?

Got a question? Ask me and I will answer by email.