9 min · +150 XP
Install Claude Code, step by step
One line in the terminal, a version check, and the first start.
By the end of this lesson
You will have Claude Code installed, logged in and started in your project folder.
You install Claude Code once, with one line in the terminal. It takes a few minutes. Older guides tell you to install Node.js first; the current installer does not need it.
The Claude desktop app has Claude Code in its Code tab, with no terminal needed. It is available for Mac and Windows, and for Linux in beta. Download it, sign in and click Code. Details: code.claude.com/docs/en/desktop
Step 1. Install
curl -fsSL https://claude.ai/install.sh | bash
Paste into Terminal and press Enter. The command shows no progress while it downloads, so wait. When it finishes you see "Claude Code successfully installed!"
irm https://claude.ai/install.ps1 | iex
Use this when your prompt starts with PS. Paste, press Enter and wait without closing the window until you see "Claude Code successfully installed!"
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Use this only if your prompt has no PS in front, for example C:\Users\Anna>. That means you are in CMD, not PowerShell.
curl -fsSL https://claude.ai/install.sh | bash
Paste with Ctrl+Shift+V and press Enter. The command shows no progress while it downloads. Wait for "Claude Code successfully installed!"
›How to paste into the terminal
Click the copy button on the command card. Click inside the terminal window. Paste: Cmd+V on a Mac, Ctrl+V or a right-click in Windows PowerShell, Ctrl+Shift+V on Linux. Then press Enter.
This line is the only command in the course you need to paste yourself. If you lose this page, you can get it from the Claude app or claude.ai: just ask.
“How do I install Claude Code on my Mac? Give me the one line to paste into Terminal and tell me what I should see when it works.”
Ask this in the Claude app or on claude.ai, not in the terminal. It gives you the current install line.
“How do I install Claude Code on Windows? Give me the one line to paste into PowerShell and tell me what I should see when it works.”
Ask this in the Claude app or on claude.ai, not in the terminal. It gives you the current install line.
“How do I install Claude Code on Linux? Give me the one line to paste into the terminal and tell me what I should see when it works.”
Ask this in the Claude app or on claude.ai, not in the terminal. It gives you the current install line.
Alternatives: brew install --cask claude-code (stable channel, usually about a week behind; claude-code@latest tracks the latest) or winget install Anthropic.ClaudeCode. Neither auto-updates, so run brew upgrade claude-code or winget upgrade Anthropic.ClaudeCode. apt, dnf and apk packages also exist. The native install updates itself in the background; claude update updates it right now. On native Windows, Git for Windows is recommended so Claude Code can use its Bash tool; without it Claude Code uses PowerShell.
Step 2. Check it
claude --version
Open a new terminal window first, because a window that was already open does not see the new program. A working install prints a version number followed by (Claude Code). If it says claude is not found, see the next lesson.
Step 3. First start
First start, screen by screen
- 1Open a terminal in your project folder from the Files lesson: right-click my-first-project and choose New Terminal at Folder (Mac) or Open in Terminal (Windows 11, Linux).
- 2Type claude and press Enter.
- 3If it asks you to choose a colour theme, pick one with the arrow keys and press Enter. You can change it later with /theme.
- 4Choose how to log in. If you bought Pro, Max, Team or Enterprise, choose the Claude subscription option. Choose the Anthropic Console option only if you pay through the API.
- 5A browser window opens. Sign in with your Claude account and approve. If the browser does not open, press c to copy the login link and paste it into the browser yourself.
- 6The terminal shows Login successful. Press Enter to continue.
- 7Claude Code asks whether you trust the files in this folder. It is your own new folder, so choose the option to trust it.
- 8The input box appears, with the version, the current model and the folder shown above it. You are in.
Claude works with the folder where you start it and everything inside. In the home folder that is all your personal files. Also, in the home folder the trust question is not remembered and comes back on every start.
Do it now
0/6Do it now
0/6Do it now
0/6An error on the screen is normal and fixable. Most install problems are a handful of known errors, each with a short fix.
When the install does not work →You have a Pro plan. Which login option do you pick on the first start?
The installer said it succeeded, but in the same window claude --version says the command is not found. What do you try first?
Facts checked against the official Claude Code docs October 24, 2026 · source

Author
Evgenii Arsentev
PhD · Chief Executive Officer, digital health