Installing Claude Code
Your team lead just sent you a Slack message: “We’re standardizing on Claude Code for AI-assisted development. Get it installed by standup tomorrow.” You open the docs, see three different installation methods, and wonder which one actually works without breaking your Node setup or polluting your global packages.
This guide cuts through the options and gets you to a working claude command in under 10 minutes, regardless of your operating system.
What You’ll Walk Away With
Section titled “What You’ll Walk Away With”- Claude Code CLI installed and available on your PATH
- Auto-updates configured so you never fall behind on versions
- A verified installation that responds to
claude --version - Knowledge of which installation method to pick and why
System Requirements
Section titled “System Requirements”Before installing, confirm your system meets these minimums:
| Requirement | Details |
|---|---|
| Operating System | macOS 10.15+, Ubuntu 20.04+ / Debian 10+, Windows 10+ (native or WSL) |
| RAM | 4 GB minimum |
| Network | Internet connection required for authentication and API calls |
| Shell | Bash, Zsh, Fish, or PowerShell |
| Location | Must be in an Anthropic-supported country |
Choose Your Installation Method
Section titled “Choose Your Installation Method”The native installer is the recommended method. It downloads a standalone binary, adds it to your PATH, and configures automatic background updates.
macOS and Linux:
curl -fsSL https://claude.ai/install.sh | bashWindows PowerShell:
irm https://claude.ai/install.ps1 | iexWindows CMD:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdAfter installation, open a new terminal window (or run source ~/.zshrc / source ~/.bashrc) and verify:
claude --versionThe native installer auto-updates in the background. You will always be on the latest version without running any upgrade commands.
If you prefer managing packages through Homebrew:
brew install --cask claude-codeVerify the installation:
claude --versionOn Windows, you can also use WinGet:
winget install Anthropic.ClaudeCodeVerify:
claude --versionLike Homebrew, WinGet does not auto-update. Run winget upgrade Anthropic.ClaudeCode manually.
Post-Installation Verification
Section titled “Post-Installation Verification”Run these three commands to confirm everything is working:
# 1. Check the versionclaude --version
# 2. Check that the binary is on your PATHwhich claude
# 3. Start a session (will prompt for auth on first run)claudeIf which claude returns nothing, your PATH needs updating. The native installer adds the binary to ~/.claude/bin/ and updates your shell profile. If you see errors, open a fresh terminal window — your current session may have stale PATH variables.
Updating Claude Code
Section titled “Updating Claude Code”How you update depends on how you installed:
| Method | Update Command | Auto-Update? |
|---|---|---|
| Native installer | Automatic | Yes |
| Homebrew | brew upgrade claude-code | No |
| WinGet | winget upgrade Anthropic.ClaudeCode | No |
For the native installer, you can control the update channel:
// In ~/.claude/settings.json{ "autoUpdatesChannel": "stable"}The "stable" channel gives you versions that are about a week old and skip releases with known regressions. The default "latest" channel gives you the most recent release immediately.
Uninstalling
Section titled “Uninstalling”If you need to remove Claude Code:
claude uninstallThis removes the binary and cleans up PATH entries.
brew uninstall claude-codewinget uninstall Anthropic.ClaudeCodeTo also remove all configuration and session data:
rm -rf ~/.clauderm -rf ~/.claude.jsonWhen This Breaks
Section titled “When This Breaks”“Permission denied” during installation — Do not use sudo with any installation method. The native installer writes to ~/.claude/bin/ which does not require elevated privileges. If you previously installed with sudo npm install -g, uninstall first and reinstall without sudo.
“command not found: claude” after installation — Open a new terminal window. The installer modifies your shell profile (.zshrc, .bashrc, or .profile), but the changes only take effect in new sessions. If it still fails, check that ~/.claude/bin is in your PATH: echo $PATH | tr ':' '\n' | grep claude.
“EACCES error” on npm install — This means your global npm directory has permission issues. Switch to the native installer instead, or fix npm permissions with npm config set prefix ~/.npm-global and add ~/.npm-global/bin to your PATH.
Installation succeeds but claude hangs — Check your network connection. Claude Code needs to reach api.anthropic.com on startup. If you are behind a corporate proxy, set HTTP_PROXY and HTTPS_PROXY environment variables.
Windows-specific: “execution of scripts is disabled” — Run PowerShell as administrator and execute Set-ExecutionPolicy RemoteSigned, then retry the installation.
What’s Next
Section titled “What’s Next”With Claude Code installed, the next step is authentication — connecting the CLI to your Anthropic account so it can make API calls.