How to install Claude Code on Mac and Windows, step by step
You install Claude Code with a single command typed in the terminal, in about two minutes. You need a paid Claude plan: the free claude.ai account does not include Claude Code. Below are the exact steps, for people who have never opened a terminal.
The commands in this guide come from the official installation documentation, checked on 7 October 2026.
What do you need to install Claude Code?
- A computer with macOS 13 or later, Windows 10 (version 1809) or later, or Linux (for example Ubuntu 20.04 or later).
- At least 4 GB of RAM.
- An internet connection.
- A Claude Pro, Max, Team or Enterprise plan, or a Claude Console account (pay as you go). The cheapest, Pro, costs $20 a month plus tax and you can cancel any time. All the options are in the guide how much does Claude Code cost.
You don't need anything else installed first. No Node.js, no other software.
How do you open the terminal?
The terminal is a window where you type commands as text instead of clicking. You can't break anything just by opening it.
On a Mac: press Cmd + Space, type "Terminal", then Enter.
On Windows: press the Windows key, type "PowerShell" and click "Windows PowerShell".
When it opens, you see a short line ending in %, $ or > and a blinking cursor. That's where you type. On Windows, if the line starts with PS, you're in PowerShell; if not, you're in Command Prompt (CMD). More about the terminal in the glossary.
Which command do you type to install Claude Code?
Pick the command for your computer, paste it into the terminal and press Enter.
On a Mac or Linux:
curl -fsSL https://claude.ai/install.sh | bash
On Windows (PowerShell):
irm https://claude.ai/install.ps1 | iex
On Windows (Command Prompt, CMD):
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
The command downloads the installer from the official Claude site and runs it. You'll see a few lines of text scroll past; that's normal. When the line where you can type comes back, the install is done. On Windows you don't need to run the terminal as administrator.
This version updates itself in the background. You don't have to do anything to stay on the latest version.
How do you check that the install worked?
Close the terminal, open a new one and type:
claude --version
If you see a version number followed by "(Claude Code)", it's installed. For a full check, type:
claude doctor
claude doctor checks the install and the settings without starting a conversation, and tells you what's wrong and how to fix it.
How do you sign in and start your first conversation?
Go into the folder you want to work in and start Claude:
cd folder-name
claude
The first time, your browser opens and you log in with your claude.ai account. After that, your login is saved and you don't sign in every time. To switch accounts later, type /login inside Claude.
Then you see the welcome screen and can type what you want to do, in plain words. Try: "tell me what's in this folder". Claude reads the files in the folder on its own and doesn't change anything without asking you.
Tip: type cd (with a space after it), then drag the folder from Finder or Explorer into the terminal window. The path fills itself in.
What do you do if you get an error?
- "command not found" or "claude is not recognized". A terminal opened before the install doesn't know about the program yet. Close it and open a new one. If it still doesn't work, the program's folder isn't in the terminal's search path (PATH); the fix is in the official troubleshooting guide.
- "The token '&&' is not a valid statement separator". You're in PowerShell but pasted the CMD command. Use the command with
irm. - "'irm' is not recognized". You're in CMD but pasted the PowerShell command. Use the
curlcommand for CMD. - It asks for a subscription. The free account doesn't include Claude Code; you need Pro or a bigger plan.
Any other error: type claude doctor and read what it recommends.
Are there other ways to install it?
Yes, but the command above is the one Anthropic recommends. The alternatives, briefly:
- Homebrew (Mac):
brew install --cask claude-code. It doesn't update itself; you update it withbrew upgrade claude-code. - WinGet (Windows):
winget install Anthropic.ClaudeCode. This one doesn't update itself either. - npm:
npm install -g @anthropic-ai/claude-code. It needs Node.js 22 or later. If you don't know what Node.js is, you don't need this option. - The Claude desktop app: if you don't want a terminal at all, the app has a "Code" tab that includes Claude Code, with nothing extra to install.
On Windows, the documentation also recommends Git for Windows. It's optional: without it, Claude Code uses PowerShell to run commands.
How do you uninstall Claude Code?
If you installed it with the recommended command, on a Mac or Linux you type:
rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claude
For Windows and the other methods, the exact commands are in the official documentation. Your settings live separately, in the ~/.claude folder, and stay there until you delete them.
Frequently asked questions
Can I install Claude Code without a subscription?
You can install it, but you can't use it without a paid Claude plan or a Claude Console account with credit.
Does it work on Windows 7 or 8?
No. The official documentation requires Windows 10 (version 1809) or later.
Do I have to install it for every project?
No. You install it once and start it from any folder by typing claude.
Do I have to update it by hand?
No, if you installed it with the recommended command: it updates itself. You can force an update with claude update.
Can I use it on my phone?
Yes, but not by installing it: on a phone you use it from the Claude app or on the web, at claude.ai/code.
What's next
Installing is the first module of the "Claude Code for Beginners" course, whose first two modules are free, with 1–2 minute lessons you can take on your phone and a practice terminal where you try commands without breaking anything on your computer. After installing, carry on with the Claude Code tutorial for beginners, what is Claude Code or the whole course. New words are in the glossary.