Claude Code installs with one command and needs no Node.js: curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux or WSL, or irm https://claude.ai/install.ps1 | iex in Windows PowerShell. Open a new terminal, run claude --version, then run claude in a project folder and sign in. You need a Pro, Max, Team, Enterprise or Console account; the free Claude plan does not include Claude Code. Native installs update themselves, and claude update forces it.
To install Claude Code, open a terminal and run one command: curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux or WSL, or irm https://claude.ai/install.ps1 | iex in Windows PowerShell. Then run claude inside a project folder and sign in with a Pro, Max, Team, Enterprise or Console account. The free Claude plan does not include Claude Code.
Every command here is copied from Anthropic's Claude Code docs as read on 13 October 2026: advanced setup, the quickstart, authentication and troubleshoot installation and login. If you learned the older method, note what changed: the recommended installer is now a native binary, and npm is one of several alternatives.
- 1Run the install command for your system
It shows no progress while it downloads. Wait for it to finish.
- 2Open a new terminal and run claude --version
A working install prints a version number followed by (Claude Code).
- 3Go to a project folder and run claude
Claude Code opens an interactive session in your terminal.
- 4Sign in through the browser prompt
Use a Pro, Max, Team or Enterprise login, or a Console account.
Before you install
Claude Code installation has few requirements, and Node.js is not one of them. From the setup docs:
| Requirement | What you need |
|---|---|
| Operating system | macOS 13.0+, Windows 10 1809+ or Windows Server 2019+, Ubuntu 20.04+, Debian 10+, Alpine Linux 3.19+ |
| Hardware | 4 GB or more of RAM, x64 or ARM64 processor |
| Shell | Bash, Zsh, PowerShell or CMD |
| Network | An internet connection, in a country Anthropic supports |
| Account | Claude Pro, Max, Team or Enterprise, or a Claude Console account |
The account is the part people miss. Installing is free, but Claude Code will not run on the free Claude plan. Plan prices and the pay-per-token option are in our Claude pricing guide, and Claude Code free options covers ways to try it for less. Anthropic lists the countries it supports.
Install commands for each system
macOS, Linux and WSL
curl -fsSL https://claude.ai/install.sh | bashThis is the recommended native install. On macOS and Linux it places a launcher at ~/.local/bin/claude. Native installations update automatically in the background.
Windows
Your prompt tells you which command to use: it shows PS C:\ in PowerShell and C:\ without the PS in CMD. In PowerShell:
irm https://claude.ai/install.ps1 | iexIn CMD:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdYou do not need to run as Administrator. Anthropic recommends installing Git for Windows so Claude Code can use its Bash tool; without it, Claude Code runs shell commands through PowerShell.
- Needs nothing extra; Git for Windows is optional
- Install from PowerShell or CMD
- Suits Windows-native projects and tools
- Sandboxing is not supported
- Needs WSL 2 enabled
- Run the Linux command inside your WSL terminal
- Suits Linux toolchains
- Sandboxed command execution is supported
Homebrew, WinGet, npm and Linux packages
| Method | Command | Updates itself? |
|---|---|---|
| Native installer | The three commands above | Yes, in the background |
| Homebrew | brew install --cask claude-code | No. Run brew upgrade claude-code |
| WinGet | winget install Anthropic.ClaudeCode | No. Run winget upgrade Anthropic.ClaudeCode |
| npm | npm install -g @anthropic-ai/claude-code | Needs Node.js 22 or later. Never use sudo |
| apt, dnf or apk | Signed repositories, set up in the docs | No. Updates come with your system upgrades |
The npm package installs the same native binary as the standalone installer, so it is an alternative route and not a different product. On Alpine and other musl-based distributions, the docs add a step first: apk add bash curl libgcc libstdc++ ripgrep.
Check that it worked
claude --version
claude doctorclaude --version prints a version number such as 2.1.211 (Claude Code). claude doctor prints read-only diagnostics without starting a session: install health, settings errors and any warnings with suggested fixes. Run it whenever something looks off. One trap: the VS Code extension bundles its own private copy of the CLI and does not add it to your PATH, so installing the extension alone will not give you a claude command in the terminal.
Sign in
cd /path/to/your/project
claudeOn first launch Claude Code opens a browser window for you to log in, and the terminal shows Login successful when it completes. Three details from the authentication docs save time:
- If the browser does not open, press
cto copy the login URL and paste it into a browser yourself. - In WSL2, over SSH or in a container, the browser may show a login code instead of redirecting. Paste it at the
Paste code here if promptedprompt. - To switch accounts later, type
/logininside a session./logoutsigns you out.
Which account you use decides how you pay. A Claude subscription login draws from your plan's usage limits. A Console login bills per token from prepaid credits, and on first login Claude Code creates a workspace named Claude Code in the Console so its costs are tracked in one place. Organizations on Amazon Bedrock, Google Cloud or Microsoft Foundry set environment variables instead of logging in through a browser.
Source: Anthropic's help centre, managing API key environment variables in Claude Code. If you do want per-token billing, see how to get a Claude API key.
Your first session
Claude Code reads your project files as it needs them, so start with a question. The quickstart suggests what does this project do?, then a small change such as add a hello world function to the main file. When Claude asks before making a change, select Yes to approve it.
How often it asks depends on the permission mode. Press Shift+Tab to cycle modes during a session. On version 2.1.283 or later, auto mode is the starting mode for interactive terminal sessions (permission modes).
| Mode | Runs without asking | Good for |
|---|---|---|
| default (Manual) | Reads only | Reviewing every action yourself |
| acceptEdits | Reads, file edits and common filesystem commands | Iterating on code you are reviewing |
| plan | Reads, so Claude explores before it changes anything | Understanding a codebase first |
| auto | Everything, with background safety checks | Long tasks with fewer prompts |
Useful commands on day one: /help lists commands, /clear resets the conversation, claude -c continues your most recent conversation in the current folder, and /exit quits.
Update, reinstall or uninstall
Update. Native installs check for updates on startup and install them in the background. To apply one now, run claude update. Homebrew, WinGet and Linux package installs need their own upgrade command, and for npm the docs say to use npm install -g @anthropic-ai/claude-code@latest, not npm update -g.
Reinstall. Remove the binary and version files, then run the install command again. If claude still behaves oddly, you may have two installations: which -a claude on macOS or Linux, or where.exe claude on Windows, lists every copy on your PATH. Keep one.
# macOS, Linux, WSL
rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claude
# Windows PowerShell
Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force
Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -ForceUninstall. The commands above remove a native install. For the others: brew uninstall --cask claude-code, winget uninstall Anthropic.ClaudeCode or npm uninstall -g @anthropic-ai/claude-code. Your settings live in ~/.claude and survive all of this. Deleting that folder removes your settings, MCP server configuration and session history.
Fix common install errors
| What you see | Cause | Fix |
|---|---|---|
| command not found: claude, or claude is not recognized | The install folder is not on your PATH | Open a new terminal, then add ~/.local/bin to PATH (commands below) |
| irm is not recognized | You are in CMD, not PowerShell | Use the CMD command, or switch to PowerShell |
| The token '&&' is not a valid statement separator | You are in PowerShell, not CMD | Use the PowerShell command |
| syntax error near unexpected token '<', or a 403 | The install script returned HTML instead of a script | See the docs for alternative install methods |
| EACCES: permission denied | The install directory is not writable | Fix the directory's permissions. Do not use sudo with npm |
| OAuth error: Invalid code | The login code expired or was cut off when pasted | Press Enter to retry, or press c to copy the full URL |
| API Error: 403 Request not allowed | No active subscription, or no Claude Code role | Check your plan at claude.ai/settings or ask your Console admin |
| This organization has been disabled | An old ANTHROPIC_API_KEY is overriding your login | Unset the variable, then run claude again |
The PATH error is the most common. First open a new terminal, because the window you installed from keeps its old PATH. If that does not help, add the install folder. For Zsh, the default on macOS:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcFor Bash on Linux, use ~/.bashrc in both lines. In Windows PowerShell, add it to your User PATH and restart the terminal:
$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
[Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')Anything else is in Anthropic's troubleshooting page, which matches each error message to a fix.
After the install
The terminal is one of several ways in. Claude Code also runs as a desktop app and inside editors: see our Claude Code desktop app guide and Claude Code in VS Code. To get more from it, coding with Claude covers daily workflow, Claude Code hooks covers automation, and the MCP guide explains how to connect tools.
Still deciding between tools? Claude Code vs Cursor compares it with an AI editor, and Codex vs Claude Code compares it with OpenAI's agent. AI SaaS Builder, one of our programs, has a module on the Claude Code CLI and MCP servers inside a full product build, and the AI automation library lists every guide.
What changes often
- Version numbers. The examples in the docs show 2.1.211; yours will be newer
- The default permission mode. Auto mode became the starting mode in version 2.1.283
- The release channel. Latest is the default; stable runs about a week behind
- Minimum versions for new models. A new model can need a newer Claude Code than the stable channel serves
- System requirements and supported countries. Check the setup page for your platform
Installing Claude Code: FAQ
How do I install Claude Code on Mac?
Open Terminal and run curl -fsSL https://claude.ai/install.sh | bash. When it finishes, open a new terminal window and run claude --version to confirm. Homebrew also works: brew install --cask claude-code. Claude Code needs macOS 13.0 or later, per Anthropic's setup docs read on 13 October 2026.
How do I install Claude Code on Windows?
In PowerShell, run irm https://claude.ai/install.ps1 | iex. You do not need to run as Administrator. In CMD, use the install.cmd command from the docs instead. Installing Git for Windows is recommended so Claude Code can use the Bash tool; without it, Claude Code runs shell commands through PowerShell. You can also install inside WSL with the Linux command.
Do I need Node.js to install Claude Code?
No. The native installer, Homebrew and WinGet need no Node.js. Only the npm method does: Anthropic says the npm package requires Node.js 22 or later. Even then, the package downloads a native binary that does not use your Node.js at runtime. Older guides that list Node.js 18 as a requirement are out of date.
Is Claude Code free to install?
Installing costs nothing, but you cannot use it without an account that includes it. Anthropic's docs say Claude Code requires a Pro, Max, Team, Enterprise or Console account, and that the free Claude plan does not include Claude Code access. A Console account bills per token from prepaid credits.
Why does my terminal say command not found: claude?
The install worked but its folder is not on your PATH. The native installer puts claude at ~/.local/bin/claude on macOS and Linux and at %USERPROFILE%\.local\bin\claude.exe on Windows. Open a new terminal first, since the old one keeps its old PATH. If it still fails, add that folder to your PATH with the commands in the troubleshooting section.
How do I update or reinstall Claude Code?
Native installs update themselves in the background. To update now, run claude update. Homebrew, WinGet and npm installs need their own upgrade command. To reinstall, remove the binary and version files as in the uninstall steps, then run the install command again. Your settings in ~/.claude stay unless you delete them.
How do I uninstall Claude Code?
For a native install on macOS, Linux or WSL, run rm -f ~/.local/bin/claude and rm -rf ~/.local/share/claude. For other methods use brew uninstall --cask claude-code, winget uninstall Anthropic.ClaudeCode or npm uninstall -g @anthropic-ai/claude-code. Deleting ~/.claude as well removes your settings, MCP server configuration and session history.