Installation
This page covers everything you need to install Claude Code — system requirements, platform-specific steps, how to keep it updated, and how to uninstall it cleanly.
Account required
Claude Code requires a Pro, Max, Team, Enterprise, or Console account.
The free Claude.ai plan does not include access. The cheapest entry point is the Anthropic Console (pay-as-you-go, no subscription needed).
System requirements
| Requirement | Details |
|---|---|
| Operating system | macOS 13+, Windows 10 (build 1809)+, Ubuntu 20.04+, Debian 10+, Alpine Linux 3.19+ |
| RAM | 4 GB minimum |
| Network | Internet connection required |
| Shell | Bash, Zsh, PowerShell, or CMD |
| Windows dependency | Git for Windows required |
| Location | Anthropic supported countries |
Install Claude Code
Choose the installation method for your platform. The native installer is recommended for all platforms — it requires no external dependencies and auto-updates in the background.
macOS / Linux / WSL
curl -fsSL https://claude.ai/install.sh | bashbrew install --cask claude-codeHomebrew does not auto-update
Run brew upgrade claude-code periodically to stay current.
Also run brew cleanup claude-code occasionally to reclaim disk space from old versions.
Windows
irm https://claude.ai/install.ps1 | iexcurl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdwinget install Anthropic.ClaudeCodePowerShell vs CMD
If you see The token '&&' is not a valid statement separator, you are in PowerShell — not CMD.
Your prompt shows PS C:\ when you're in PowerShell. Use the PowerShell command instead.
Windows requires Git for Windows
Claude Code uses Git Bash internally. Install it first from git-scm.com/downloads/win.
You do not need to run PowerShell as Administrator.
WinGet does not auto-update
Run winget upgrade Anthropic.ClaudeCode periodically to get the latest version.
Desktop app (no terminal required)
If you prefer a graphical interface, the Claude Desktop app lets you use Claude Code without a terminal. It supports visual diff review, multiple sessions side by side, and scheduled tasks.
After installing, launch the app, sign in, and click the Code tab.
Platform-specific notes
Windows — configure Git Bash path
Claude Code auto-detects Git Bash from the default install location. If it was installed elsewhere, set the path manually in %USERPROFILE%\.claude\settings.json:
{
"env": {
"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
}
}Windows — WSL
Both WSL 1 and WSL 2 are supported. Inside your WSL terminal, install using the Linux/macOS command:
curl -fsSL https://claude.ai/install.sh | bashWSL 2 additionally supports sandboxing for enhanced security. WSL 1 does not.
Alpine Linux and musl-based distributions
The native installer on Alpine requires libgcc, libstdc++, and ripgrep. Install them first:
apk add libgcc libstdc++ ripgrepThen disable the built-in ripgrep in ~/.claude/settings.json:
{
"env": {
"USE_BUILTIN_RIPGREP": "0"
}
}Verify your installation
After installing, confirm Claude Code is working:
claude --versionFor a full health check of your environment — shell, Git Bash path, network, and auth:
claude doctorThen start Claude Code in any project directory:
cd your-project
claudeYou will be prompted to log in on first use.
Keeping Claude Code updated
Auto-updates (native install only)
Native installations check for updates on startup and install them in the background. The update takes effect the next time you start Claude Code.
To apply an update immediately without waiting:
claude updateRelease channels
You can choose which release channel to follow:
| Channel | Description |
|---|---|
latest | New features as soon as they are released (default) |
stable | Typically ~1 week behind; skips releases with major regressions |
Set your preferred channel in ~/.claude/settings.json (macOS/Linux) or %USERPROFILE%\.claude\settings.json (Windows):
{
"autoUpdatesChannel": "stable"
}Or set it interactively inside a Claude Code session: /config → Auto-update channel.
Disable auto-updates
If you want full manual control over updates:
{
"env": {
"DISABLE_AUTOUPDATER": "1"
}
}Install a specific version
You can pin a specific version number or channel at install time:
curl -fsSL https://claude.ai/install.sh | bash -s stablecurl -fsSL https://claude.ai/install.sh | bash -s 2.1.89& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) stable& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) 2.1.89The channel you choose at install time becomes the default for future auto-updates.
Migrating from npm (legacy)
npm installation is deprecated
The native installer is faster, requires no Node.js dependency, and auto-updates automatically. Migrate when possible.
If you previously installed Claude Code via npm, switch to the native installer:
# 1. Install the native binary
curl -fsSL https://claude.ai/install.sh | bash
# 2. Remove the old npm installation
npm uninstall -g @anthropic-ai/claude-codeIf you still need npm for compatibility reasons (requires Node.js 18+):
npm install -g @anthropic-ai/claude-codeDo not use sudo npm install -g — this causes permission issues and security risks.
Uninstalling Claude Code
Native install
rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claudeRemove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force
Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -ForceHomebrew
brew uninstall --cask claude-codeWinGet
winget uninstall Anthropic.ClaudeCodenpm
npm uninstall -g @anthropic-ai/claude-codeRemove configuration and session data
This deletes all your settings permanently
This removes your settings, MCP server configs, allowed tools, and full session history. Only do this if you want a completely clean slate.
# Remove global settings and state
rm -rf ~/.claude
rm -f ~/.claude.json
# Remove project-level settings (run from project directory)
rm -rf .claude
rm -f .mcp.json# Remove global settings and state
Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force
Remove-Item -Path "$env:USERPROFILE\.claude.json" -Force
# Remove project-level settings (run from project directory)
Remove-Item -Path ".claude" -Recurse -Force
Remove-Item -Path ".mcp.json" -ForceTroubleshooting
claude is not recognized
Close and reopen your terminal after installation so the updated PATH is loaded.
Git Bash not found (Windows)
Set CLAUDE_CODE_GIT_BASH_PATH in your settings.json (see Windows section above).
&& is not a valid statement separator (Windows)
You are in PowerShell. Use the PowerShell install command, not the CMD one.
Permission errors during install
Do not use sudo or "Run as Administrator" — Claude Code does not require elevated permissions.
Search not working (Alpine Linux)
Make sure ripgrep is installed and USE_BUILTIN_RIPGREP is set to "0" in settings.
For anything else, run claude doctor first — it diagnoses most common issues automatically. Then see the official troubleshooting guide.
Next steps
- Authentication — log in with your Claude account or configure an API key
- Your First Session — run Claude Code on a real project for the first time