As of October 2026, the recommended way to install Claude Code is the native installer, and the command depends on your shell. macOS, Linux and WSL use curl -fsSL https://claude.ai/install.sh | bash. Windows PowerShell uses irm https://claude.ai/install.ps1 | iex. Windows CMD uses curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd. Run the wrong one and you get an error that looks like a broken installer but is not.
Everything below is from Anthropic's setup documentation at code.claude.com, read on 2026-10-19.
Before you start
- OS: macOS 13.0+, Windows 10 1809+ or Windows Server 2019+, Ubuntu 20.04+, Debian 10+, or Alpine Linux 3.19+.
- Hardware: 4 GB+ RAM, x64 or ARM64.
- Network: an internet connection is required.
- Account: Claude Code needs a Pro, Max, Team, Enterprise or Console account. The free claude.ai plan does not include it.
Install: pick your shell
macOS, Linux, WSL
curl -fsSL https://claude.ai/install.sh | bash
Windows PowerShell (the prompt shows PS C:\)
irm https://claude.ai/install.ps1 | iex
Windows CMD (the prompt shows C:\ without PS)
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
The installer shows no progress while it downloads. When it finishes, open a new terminal window and run:
claude --version
A working install prints a version number such as 2.1.211 (Claude Code). For a fuller check, run claude doctor.
The 2 errors that are really a shell mix-up
| Error | What it means |
|---|---|
The token '&&' is not a valid statement separator |
You pasted the CMD command into PowerShell |
'irm' is not recognized as an internal or external command |
You pasted the PowerShell command into CMD |
Check the prompt: PS C:\ is PowerShell, C:\ without PS is CMD. If the install fails with syntax error near unexpected token '<' or a 403, the docs point to their troubleshooting page for alternative install methods.
If claude is "not found" after a successful install, the install directory is not on your PATH yet. Open a new terminal first; if that does not fix it, follow the "Fix your PATH" section of the troubleshooting guide.
Other install methods
| Method | Command |
|---|---|
| Homebrew | brew install --cask claude-code |
| WinGet | winget install Anthropic.ClaudeCode |
| npm (needs Node.js 22 or later) | npm install -g @anthropic-ai/claude-code |
| apt, dnf, apk | Signed repositories for Debian, Fedora, RHEL and Alpine |
Do not use sudo npm install -g; the docs warn it can cause permission issues and security risks. Native installs auto-update in the background. Homebrew, WinGet and Linux package manager installs do not, so run brew upgrade claude-code or winget upgrade Anthropic.ClaudeCode yourself. claude update applies an update immediately.
First run
cd your-project
claude
Claude Code prompts you to log in on first use through the browser. Git for Windows is recommended on native Windows so Claude Code can use the Bash tool; without it, Claude Code uses PowerShell as the shell tool.
Uninstall
On macOS, Linux and WSL:
rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claude
Settings live in ~/.claude and ~/.claude.json; removing them deletes your settings, allowed tools, MCP server configurations and session history.
Limits of this post
I did not run the installers for this post; the commands are copied from the documentation as of October 2026, and the sample version number is the one shown there. Commands and URLs can change, so prefer the live setup page if anything fails. I write more Claude Code notes, mostly in Korean, at my-blog.org/claude-code.
FAQ
What is the Claude Code install command? For macOS, Linux and WSL: curl -fsSL https://claude.ai/install.sh | bash.
How do I install Claude Code on Windows? In PowerShell, run irm https://claude.ai/install.ps1 | iex. In CMD, use the curl-based install.cmd command shown above.
How do I check it worked? Open a new terminal and run claude --version.
Does it need Node.js? Not for the native installer. The npm package requires Node.js 22 or later.
Can I use the free Claude plan? No. Claude Code requires a Pro, Max, Team, Enterprise or Console account.
Free tools I keep on my own site: 34 calculators and how-to guides - loans, severance pay, take-home salary, savings vs deposits. New ones go out in one email, no ads.


Top comments (0)