Skip to content

An editorial team and a community building with AI

← Agents & workflows

Agents & workflows · · 10 min read

Install Claude Code: Windows, macOS, Linux

How to install Claude Code on macOS, Linux and Windows: native installer, Homebrew, WinGet and npm commands, first login, updates and common error fixes.

To install Claude Code on macOS, Linux or WSL, run curl -fsSL https://claude.ai/install.sh | bash in a terminal; on Windows, run irm https://claude.ai/install.ps1 | iex in PowerShell. Then start it with claude in your project folder and log in with a paid Claude plan or a Claude Console account.

This guide covers every install method Anthropic documents (the native installer, Homebrew, WinGet, npm and Linux package managers), the system requirements, the desktop app, the first login, updates, uninstalling and fixes for the errors people hit most often. Every command is copied from Anthropic's docs as of November 23, 2026, when the newest release in the changelog was 2.1.330 from November 20, 2026.

Install Claude Code in three commands

On macOS, Linux or WSL, open a terminal and run:

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

The installer shows no progress while it downloads. When it finishes, open a new terminal window and check the installation:

claude --version

Then start Claude Code in the folder of the project you want to work on:

cd /path/to/your/project
claude

The whole process, step by step:

  1. Run the installer. On macOS, Linux or WSL, run curl -fsSL https://claude.ai/install.sh | bash in a terminal. On Windows, run irm https://claude.ai/install.ps1 | iex in PowerShell.
  2. Check the installation. Open a new terminal window and run claude --version. A working installation prints a version number.
  3. Start Claude Code in your project. Open a terminal in the folder of the project you want to work on and run claude.
  4. Log in. Follow the browser prompt and sign in with a Claude Pro, Max, Ultra, Team or Enterprise account, or with a Claude Console account.

Installing costs nothing, but using Claude Code needs an account: a Pro, Max, Ultra, Team, Enterprise or Claude Console account. The free Claude plan does not include Claude Code. The cheapest option is Pro at $20 a month, or $17 a month billed annually; see Claude Code pricing for all plans and limits.

System requirements

  • Operating system: macOS 13.0 or later, Windows 10 1809 or later or Windows Server 2019 or later, Ubuntu 20.04 or later, Debian 10 or later, Alpine Linux 3.19 or later. It must be a 64-bit system.
  • Hardware: 4 GB of RAM or more and an x64 or ARM64 processor. The processor needs the AVX instruction set, which roughly pre-2013 CPUs lack.
  • Shell: Bash, Zsh, PowerShell or CMD.
  • Network and location: an internet connection, in one of the countries Anthropic supports.
  • Node.js: only for the npm method, which needs Node.js 22 or later. The native installer, Homebrew and WinGet do not need it.

Install on macOS and Linux (native installer, Homebrew)

Anthropic recommends the native installer. It puts the claude command in ~/.local/bin/claude and keeps Claude Code up to date in the background. The same command works in WSL:

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

On Alpine Linux and other musl-based distributions, install bash and curl first:

apk add bash curl

If you manage your tools with Homebrew, install the cask instead:

brew install --cask claude-code

The claude-code cask tracks the stable channel, which is usually about a week behind and skips releases with major regressions. For new versions as soon as they ship, use claude-code@latest. Homebrew installs do not update themselves.

Linux package managers: apt, dnf and apk

On Debian and Ubuntu you can add Anthropic's signed repository and install the package with apt. These commands set up the stable channel:

sudo install -d -m 0755 /etc/apt/keyrings
sudo curl -fsSL https://downloads.claude.ai/keys/claude-code.asc \
  -o /etc/apt/keyrings/claude-code.asc
echo "deb [signed-by=/etc/apt/keyrings/claude-code.asc] https://downloads.claude.ai/claude-code/apt/stable stable main" \
  | sudo tee /etc/apt/sources.list.d/claude-code.list
sudo apt update
sudo apt install claude-code

Fedora and RHEL (dnf) and Alpine (apk) have equivalent repositories; the commands are in the Claude Code setup docs.

Install on Windows (PowerShell, WinGet, WSL)

On Windows you do not need administrator rights. Your prompt shows PS C:\ in PowerShell and C:\ without PS in CMD. In PowerShell, run:

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

In CMD, run:

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

If you prefer WinGet:

winget install Anthropic.ClaudeCode

The native installer puts claude.exe in %USERPROFILE%\.local\bin. Anthropic recommends Git for Windows, so Claude Code can use Git Bash for its shell tool; without it, Claude Code uses PowerShell. WinGet installs do not update themselves: run winget upgrade Anthropic.ClaudeCode from time to time.

WSL

In WSL, open your Linux terminal and use the macOS and Linux command above. WSL does not need Git for Windows. Use WSL 2: on WSL 1 the binary can fail with Exec format error. Keep your projects in your Linux home folder (/home/) rather than under /mnt/c/, where file search is slow.

Install methods compared

Claude Code install methods: systems, command, updates and notes
MethodSystemsInstall commandUpdatesNotes
Native installer (recommended)macOS, Linux, WSL, Windowscurl -fsSL https://claude.ai/install.sh | bashAutomatic, in the backgroundNo Node.js needed
HomebrewSystems with Homebrewbrew install --cask claude-codeManual: brew upgrade claude-codeclaude-code tracks the stable channel, claude-code@latest the latest one
WinGetWindowswinget install Anthropic.ClaudeCodeManual: winget upgrade Anthropic.ClaudeCodeNo administrator rights needed
npmAny system with Node.js 22 or laternpm install -g @anthropic-ai/claude-code@latestAutomatic, unless the npm folder needs sudoNever run it with sudo
apt, dnf, apkDebian, Ubuntu, Fedora, RHEL, AlpineSigned Anthropic repository (commands above)Manual, e.g. sudo apt update && sudo apt upgrade claude-codeRepository commands install the stable channel

The npm package installs the same native binary. Anthropic lists it under advanced options and warns against sudo npm install -g:

npm install -g @anthropic-ai/claude-code@latest

Claude Code download: desktop app vs terminal CLI

If you would rather not use a terminal, download the Claude desktop app from claude.com/download. Claude Code is the Code tab in the app. It runs the same engine as the CLI and shares its settings, and the app includes Claude Code, so you do not need Node.js or the CLI to use that tab. Builds exist for macOS (Intel and Apple Silicon), Windows (x64 and ARM64) and, as a beta, Linux (Ubuntu 22.04 or later or Debian 12 or later).

Two editor integrations complete the picture:

  • VS Code: install the Claude Code extension from the Extensions view (VS Code 1.94.0 or later). It also works in Cursor and other VS Code forks through Open VSX. The extension carries its own copy of the CLI but does not add it to PATH, so install the CLI as well if you want claude in a terminal.
  • JetBrains IDEs: install the CLI first, then the Claude Code plugin from the JetBrains Marketplace, and restart the IDE. The plugin does not include the CLI.

Pick the terminal CLI if you work in a terminal, script your work or connect over SSH; pick the desktop app if you want a graphical window and no install steps. More about the tool itself on our Claude Code page.

Claude Code CLI: first launch and login

Run claude in your project folder. On the first launch Claude Code opens a browser window to log in; if no browser opens, press c to copy the login URL. After a successful login the terminal shows Login successful. You can log in with:

  • a Claude Pro, Max or Ultra subscription;
  • a Claude for Teams or Enterprise account;
  • a Claude Console account, with or without an API key;
  • Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry.

To switch accounts, type /login in a running session; /logout signs you out. Outside a session, claude auth status shows who is logged in, and claude doctor prints installation and settings diagnostics without starting a session:

claude doctor

Updating and uninstalling

The native installer checks for updates on startup and while running, downloads them in the background and applies them the next time you start Claude Code. Homebrew, WinGet, apt, dnf and apk installs do not update themselves by default. To apply an update right away instead of waiting for the background check, run:

claude update

With Homebrew use brew upgrade claude-code, with WinGet winget upgrade Anthropic.ClaudeCode and with npm npm install -g @anthropic-ai/claude-code@latest. Avoid npm update -g.

Release channels and turning updates off

Native installs follow the latest channel by default. The stable channel is usually about a week old and skips releases with major regressions. Switch with claude install stable, in /config, or in your settings file:

{
  "autoUpdatesChannel": "stable"
}

To stop automatic updates, set DISABLE_AUTOUPDATER; claude update still works afterwards:

{
  "env": {
    "DISABLE_AUTOUPDATER": "1"
  }
}

Uninstall Claude Code

For a native install on macOS, Linux or WSL:

rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claude

For a native install on Windows, in PowerShell:

Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force
Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force

Other methods: brew uninstall --cask claude-code, winget uninstall Anthropic.ClaudeCode or npm uninstall -g @anthropic-ai/claude-code. To also remove your settings, allowed tools, MCP server configuration and session history, delete the configuration files. Uninstall the VS Code extension, the JetBrains plugin and the desktop app first, or they recreate the folder:

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

Troubleshooting: command not found, EACCES and proxy errors

The most common install errors, their causes and the fixes from Anthropic's docs:

Claude Code install errors: cause and fix
ErrorCauseFix
command not found: claudeThe install folder ~/.local/bin (on Windows %USERPROFILE%\.local\bin) is not on your PATH. The installer prints the fix but does not change PATH itself.Add the folder to PATH with the commands below, then open a new terminal.
Permission error (EACCES) during installYour user cannot write to ~/.local/bin or ~/.claude.Create the folder and make your user its owner (commands below). After npm permission errors, switch to the native installer.
'irm' is not recognizedYou ran the PowerShell command in CMD.Use the CMD command or open PowerShell.
The token '&&' is not a valid statement separatorYou ran the CMD command in PowerShell.Use the PowerShell command.
Claude Code does not support 32-bit WindowsYou opened "Windows PowerShell (x86)", or the system is 32-bit.Open the regular Windows PowerShell entry. Claude Code needs a 64-bit system.
Illegal instructionThe CPU lacks AVX (roughly pre-2013 processors) or the binary does not match the architecture.There is no native-binary workaround for a CPU without AVX.
Exec format errorA known bug on WSL 1.Convert the distribution to WSL 2: wsl --set-version <DistroName> 2
TLS or SSL errors behind a company networkA proxy or firewall uses its own certificate authority.Point Claude Code at the company CA bundle with NODE_EXTRA_CA_CERTS; for the macOS and Linux installer also set CURL_CA_BUNDLE.
Connection errors behind a proxyClaude Code does not know about the proxy.Set HTTPS_PROXY, HTTP_PROXY and NO_PROXY. SOCKS proxies are not supported.
App unavailable in regionClaude Code is not available in your country.No local fix exists.

Fix “command not found: claude”

Add the install folder to PATH for your shell. Zsh, the macOS default:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

Bash on Linux:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Bash on macOS:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile

PowerShell:

$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
[Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')

In CMD, open System Settings, go to Environment Variables and add %USERPROFILE%\.local\bin to your user PATH, then restart the terminal.

Fix permission errors (EACCES)

sudo mkdir -p ~/.local/bin
sudo chown -R $(whoami) ~/.local

Proxies and company certificates

Behind a proxy, set the proxy variables before you start Claude Code. Lowercase names work too:

export HTTPS_PROXY=http://proxy.example.com:8080

If your company inspects TLS traffic with its own certificate authority:

export NODE_EXTRA_CA_CERTS=/path/to/corporate-ca.pem

Claude Code install FAQ

Is Claude Code free to install?

Installing it costs nothing, but using it needs an account. Claude Code works with Claude Pro, Max, Ultra, Team and Enterprise plans or a Claude Console account; the free Claude plan does not include it. Pro costs $20 a month, or $17 a month billed annually, as of November 23, 2026.

Do I need Node.js to install Claude Code?

No. The native installer, Homebrew, WinGet and the desktop app do not need Node.js. Only the npm method needs it, in version 22 or later.

How do I install Claude Code on Windows?

Open PowerShell and run irm https://claude.ai/install.ps1 | iex. You do not need administrator rights. In CMD, use the CMD installer command, or install with WinGet: winget install Anthropic.ClaudeCode. You can also install it inside WSL with the Linux command.

How do I update Claude Code?

Native installs update themselves in the background, and claude update applies an update right away. Homebrew and WinGet installs need brew upgrade claude-code or winget upgrade Anthropic.ClaudeCode.

How do I fix the claude: command not found error?

The install folder is not on your PATH. On macOS and Linux add ~/.local/bin to PATH in your shell profile (for Zsh, ~/.zshrc), then open a new terminal. On Windows add %USERPROFILE%\.local\bin to your user PATH.

Sources (checked on November 23, 2026): code.claude.com/docs/en/setup, code.claude.com/docs/en/quickstart, code.claude.com/docs/en/troubleshoot-install, code.claude.com/docs/en/authentication, code.claude.com/docs/en/network-config, code.claude.com/docs/en/desktop-quickstart, code.claude.com/docs/en/vs-code, code.claude.com/docs/en/jetbrains, code.claude.com/docs/en/changelog, claude.com/download, claude.com/pricing.

Install Claude Code: Windows, macOS, Linux | vibecoding.inc