AI Tools & ReviewsHow-to guide
How to Install Claude Code on Windows, Mac and Linux (2026)
By Cognova AI, AI consultantsPublished
On macOS, Linux or WSL, run curl -fsSL https://claude.ai/install.sh | bash. On Windows PowerShell, run irm https://claude.ai/install.ps1 | iex, or use winget install Anthropic.ClaudeCode. Then run claude in your project folder and sign in. Claude Code needs a paid Claude plan (Pro starts at $20 a month billed monthly) or a Claude Console account; the free plan does not include it. Check the install with claude --version and claude doctor.
Claude Code is Anthropic's coding agent. It works in your terminal, reads your project, runs commands and edits files. "Install claude code" is searched about 22,000 times a month in the US, according to Semrush, and many guides still describe the older npm-only install.
This guide follows Anthropic's setup and troubleshooting docs as published on November 20, 2026, when the newest release in the changelog was 2.1.329. It is for business owners deciding whether to roll Claude Code out and for the person who will install it. We say which commands we ran on our own Windows 11 PC.
What you need
- A paid Claude plan (Pro, Max, Ultra, Team or Enterprise) or a Claude Console account with API credits
- macOS 13.0+, Windows 10 1809+ or Windows Server 2019+, Ubuntu 20.04+, Debian 10+ or Alpine Linux 3.19+
- 4 GB or more of RAM and an internet connection
- Git for Windows, recommended but optional on Windows
Time needed
10–20 minutes
Step 1: Check your plan and computer
Anthropic's setup page says the free Claude plan does not include Claude Code. You need Pro, Max, Ultra, Team or Enterprise, a Claude Console account with pre-paid API credits, or access through Amazon Bedrock, Google Cloud or Microsoft Foundry. The computer needs 4 GB or more of RAM, an x64 or ARM64 processor, and one of the supported operating systems listed above.
Step 2: Install on macOS, Linux or WSL
Open a terminal and run
curl -fsSL https://claude.ai/install.sh | bash. This native installer is Anthropic's recommended method and updates itself in the background. On a Mac with Homebrew you can runbrew install --cask claude-codeinstead, which follows a stable channel about a week behind. If you use WSL on Windows, install and run Claude Code inside the WSL terminal, not from PowerShell.Step 3: Install on Windows
Open PowerShell and run
irm https://claude.ai/install.ps1 | iex. In Command Prompt, the command iscurl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd. WinGet users can runwinget install Anthropic.ClaudeCode. You do not need to run as Administrator. Anthropic recommends installing Git for Windows so Claude Code can use Git Bash; without it, Claude Code runs shell commands through PowerShell.Step 4: Or install with npm
If your team manages tools with Node.js, install Node.js 22 or later and run
npm install -g @anthropic-ai/claude-code@latest. Anthropic says not to usesudo npm install -g, and to upgrade by running the same install command again rather thannpm update -g. Our own test machine runs Claude Code this way.Step 5: Check the install
Open a new terminal and run
claude --version. It should print a version number followed by "(Claude Code)". Then runclaude doctor, which prints read-only diagnostics about the installation and settings without starting a session. On our Windows 11 PC,claude doctorreported the install method, version, platform and auto-update status.Step 6: Sign in and start
Move into your project folder and run
claude. On first use it asks you to log in through the browser with your Claude account or Console account. Inside a session,/loginsigns in again or switches accounts. If anANTHROPIC_API_KEYenvironment variable is set and you approve it, Claude Code skips the login prompt and bills that API key instead of your plan.Step 7: Keep it updated
Native installs update automatically. To update by hand, run
claude update. Homebrew and WinGet installs do not auto-update, so usebrew upgrade claude-codeorwinget upgrade Anthropic.ClaudeCode. Teams that want fewer surprises can setautoUpdatesChannelto"stable"in settings, which Anthropic describes as about one week behind the latest release.
Which plan to buy
Anthropic’s pricing page, checked on November 20, 2026, lists Claude Code on every paid plan:
| Plan | Published price | Notes |
|---|---|---|
| Pro | $17 a month billed annually, $20 billed monthly | The entry plan for one person |
| Max | $100 a month | 5x Pro usage |
| Ultra | $200 a month | 10x Pro weekly usage |
| Team, standard seat | $20 per seat a month billed annually, $25 monthly | For teams of 2 to 150 |
| Team, premium seat | $100 per seat a month billed annually, $125 monthly | More usage per seat |
| Enterprise | $20 per seat a month billed annually, 20-seat minimum, plus usage at API rates | Admin and compliance controls |
Prices exclude tax and can change. For a small business, Team seats give central billing and admin controls; individual Pro plans are fine for a single developer trying it out.
Fixing “command not found”
The native installer puts Claude Code in ~/.local/bin on macOS and Linux and in %USERPROFILE%\.local\bin on Windows. If your terminal cannot find claude, first close and reopen it. If that fails, Anthropic’s troubleshooting page gives these PowerShell commands to add the folder to your user PATH:
$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
[Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')
On macOS with zsh, the equivalent is:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Two other common errors come from using the wrong shell. “The token ‘&&’ is not a valid statement separator” means the CMD command was pasted into PowerShell. “‘irm’ is not recognized” means the PowerShell command was pasted into CMD.
How to uninstall
For a native install on Windows, Anthropic documents:
Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force
Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force
On macOS and Linux, delete ~/.local/bin/claude and ~/.local/share/claude. For other methods, use brew uninstall --cask claude-code, winget uninstall Anthropic.ClaudeCode or npm uninstall -g @anthropic-ai/claude-code. Your settings and history stay in ~/.claude unless you delete that folder too.
What we verified
On our Windows 11 PC on November 20, 2026, we ran claude --version (2.1.312, installed with npm), claude doctor and claude mcp --help. We did not run the native installer scripts on this machine, because Claude Code was already installed. Those commands are copied exactly from Anthropic’s setup page.
How Cognova AI can help
We help small teams roll out AI coding and automation tools with sensible permissions, project instructions and training. See AI Consulting, our guide to creating Claude skills, or connecting MCP servers to Claude.
Frequently asked questions
Is Claude Code free?
No. Anthropic's setup page says the free Claude plan does not include Claude Code. On November 20, 2026, Anthropic's pricing page listed Pro at $17 a month billed annually or $20 billed monthly, Max at $100 a month, Ultra at $200 a month, and Team standard seats at $20 per seat billed annually or $25 monthly. You can also pay per use with Claude Console API credits.
Do I need WSL or Git to run Claude Code on Windows?
No. Claude Code installs and runs natively on Windows 10 1809 or later with the PowerShell, CMD or WinGet command. Git for Windows is recommended because it lets Claude Code use Git Bash for shell commands; without it, Claude Code uses PowerShell. WSL 2 is supported if you prefer Linux, and is the only Windows option where Claude Code's sandboxing works.
Why does Windows say claude is not recognized?
The install folder, %USERPROFILE%\.local\bin, is not on your PATH yet, or the terminal was open before the install finished. Close and reopen the terminal first. If that does not work, Anthropic's troubleshooting page gives PowerShell commands to add the folder to your user PATH. Also check you ran the PowerShell command in PowerShell and the CMD command in CMD.
Sources
Cite this article
Cognova AI. (2026, November 20). How to Install Claude Code on Windows, Mac and Linux (2026). Cognova AI. https://cognovaai.com/insights/how-to-install-claude-code
Permanent link: cognovaai.com/insights/how-to-install-claude-code. Quoting a passage? Select it and use “Copy quote” to get a link that jumps to that exact text.
