Skip to content

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.

  • 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

Before installing, confirm your system meets these minimums:

RequirementDetails
Operating SystemmacOS 10.15+, Ubuntu 20.04+ / Debian 10+, Windows 10+ (native or WSL)
RAM4 GB minimum
NetworkInternet connection required for authentication and API calls
ShellBash, Zsh, Fish, or PowerShell
LocationMust be in an Anthropic-supported country

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:

Terminal window
curl -fsSL https://claude.ai/install.sh | bash

Windows PowerShell:

Terminal window
irm https://claude.ai/install.ps1 | iex

Windows CMD:

Terminal window
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

After installation, open a new terminal window (or run source ~/.zshrc / source ~/.bashrc) and verify:

Terminal window
claude --version

The native installer auto-updates in the background. You will always be on the latest version without running any upgrade commands.

Run these three commands to confirm everything is working:

Terminal window
# 1. Check the version
claude --version
# 2. Check that the binary is on your PATH
which claude
# 3. Start a session (will prompt for auth on first run)
claude

If 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.

How you update depends on how you installed:

MethodUpdate CommandAuto-Update?
Native installerAutomaticYes
Homebrewbrew upgrade claude-codeNo
WinGetwinget upgrade Anthropic.ClaudeCodeNo

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.

If you need to remove Claude Code:

Terminal window
claude uninstall

This removes the binary and cleans up PATH entries.

To also remove all configuration and session data:

Terminal window
rm -rf ~/.claude
rm -rf ~/.claude.json

“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.

With Claude Code installed, the next step is authentication — connecting the CLI to your Anthropic account so it can make API calls.