Skip to content
Claudekit.ai

How to Install Claude Code (Mac, Windows, Linux, WSL)

Install Claude Code on macOS, Windows, WSL or Linux, then update, pin a version or uninstall it. Every command checked against the official docs, plus fixes.

By Claudekit Team Published 10 min read

Installing Claude Code takes one command on most systems. The details that trip people up are Windows (PowerShell vs CMD vs WSL), PATH problems, and knowing how updates work for each install method. This guide covers all of it, with every command checked against the official setup docs on October 24, 2026.

Already installed? Jump to updating or uninstalling. Want the full first-session walkthrough afterwards? See Getting started with Claude Code.

Before you install

Account. Claude Code needs a Pro, Max, Team, Enterprise or Console account, or a third-party provider (Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry). The free Claude.ai plan doesn’t include it. Our Claude Code pricing guide compares the options.

System requirements:

RequirementSupported
macOS13.0 or later
Windows10 version 1809+ or Windows Server 2019+
LinuxUbuntu 20.04+, Debian 10+, Alpine 3.19+
Hardware4 GB+ RAM, x64 or ARM64
ShellBash, Zsh, PowerShell or CMD
NetworkInternet connection, in an Anthropic-supported country

Prefer not to use a terminal? The Claude desktop app runs Claude Code with a graphical interface on macOS, Windows and Linux, and there are VS Code and JetBrains extensions.

Install on macOS, Linux or WSL

The native installer is recommended: it needs no Node.js and updates itself.

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

The command shows no progress while downloading. When it finishes, open a new terminal and check:

claude --version

A working install prints a version number followed by (Claude Code).

Homebrew (macOS and Linux)

brew install --cask claude-code          # stable channel
brew install --cask claude-code@latest   # latest channel

The claude-code cask tracks the stable channel, typically about a week behind and skipping releases with major regressions. Homebrew installs don’t auto-update by default.

Linux package managers

Anthropic publishes signed apt, dnf and apk repositories for Debian/Ubuntu, Fedora/RHEL and Alpine. Each has stable and latest channels. The setup involves adding a signing key and repository; follow the exact commands in the official docs and verify the key fingerprint they list before trusting it.

Install on Windows

You have three options. Pick based on where your projects live and whether you need sandboxing.

OptionRequiresSandboxingUse when
Native WindowsNothing; Git for Windows optionalNot supportedWindows-native projects and tools
WSL 2WSL 2 enabledSupportedLinux toolchains or sandboxed commands
WSL 1WSL 1 enabledNot supportedWSL 2 isn’t available

Native Windows: PowerShell

Your prompt starts with PS C:\ in PowerShell.

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

Native Windows: CMD

Your prompt starts with C:\ without PS in CMD.

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

You don’t need to run either as Administrator. Two common mix-ups:

  • The token '&&' is not a valid statement separator means you ran the CMD command in PowerShell.
  • 'irm' is not recognized as an internal or external command means you ran the PowerShell command in CMD.

WinGet

winget install Anthropic.ClaudeCode

WinGet installs don’t auto-update by default.

Git Bash vs PowerShell on Windows

Git for Windows is optional but useful:

  • Without it, Claude Code runs shell commands through its PowerShell tool.
  • With it, Claude Code uses Git Bash for its Bash tool, and the PowerShell tool remains available alongside it.

If Claude Code can’t find Git Bash, point to it in ~/.claude/settings.json:

{
  "env": {
    "CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
  }
}

WSL

Open your WSL distribution and run the Linux installer inside it. You install and launch claude in the WSL terminal, not from PowerShell or CMD. WSL setups don’t need Git for Windows.

Install with npm (alternative)

Use this only if you already manage tools with npm. It requires Node.js 22 or later.

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

Never use sudo npm install -g; it causes permission problems and security risks. The npm package installs the same native binary as the installer, so claude doesn’t use Node at runtime.

Sign in and run your first session

cd /path/to/your/project
claude

On first run, Claude Code opens your browser to log in. Credentials are saved, so this happens once; use /login to switch accounts later.

One billing trap: if the ANTHROPIC_API_KEY environment variable is set and you approve it, Claude Code skips the login prompt and bills that API key per token instead of your subscription. Unset it if you want to use your plan.

From here, our Claude Code tutorial walks through a real task end to end.

How to update Claude Code

Automatic updates (native installs)

Native installations check for updates on startup and periodically while running, download them in the background, and apply them the next time you start Claude Code.

Update manually

claude update

It reports Successfully updated from <old> to version <new>, or that you’re already up to date.

Update commands by install method

Installed withUpdate commandAuto-updates?
Native installerclaude updateYes
Homebrew (stable)brew upgrade claude-codeNo (opt-in available)
Homebrew (latest)brew upgrade claude-code@latestNo (opt-in available)
WinGetwinget upgrade Anthropic.ClaudeCodeNo (opt-in available)
npmnpm install -g @anthropic-ai/claude-code@latestYes, if the npm global directory is writable
apt / dnf / apkYour normal system upgradeNo

Avoid npm update -g for Claude Code; it respects the original semver range and may not move you to the newest release. On Homebrew or WinGet, setting CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE=1 lets Claude Code run the upgrade for you in the background.

Choose a release channel

Set autoUpdatesChannel via /config or in settings.json:

{
  "autoUpdatesChannel": "stable"
}

"latest" (the default) gets new features immediately; "stable" uses a version about a week old that skips releases with major regressions. A newly launched model can require a version newer than stable serves.

Install or pin a specific version

curl -fsSL https://claude.ai/install.sh | bash -s stable   # stable channel
curl -fsSL https://claude.ai/install.sh | bash -s 2.1.89   # exact version

Add "minimumVersion" to settings.json to stop updates from ever going below a version.

Turn off automatic updates

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

This stops background checks only; claude update still works. To block every update path, set DISABLE_UPDATES instead.

Verify the download (optional)

For locked-down environments, Anthropic signs its releases. Each release publishes a manifest.json with SHA256 checksums for every platform binary, signed with an Anthropic GPG key (manifest signatures exist from version 2.1.89 onward). macOS binaries are signed by “Anthropic PBC” and notarised by Apple; Windows binaries are signed by “Anthropic, PBC”:

codesign --verify --verbose ./claude          # macOS
Get-AuthenticodeSignature .\claude.exe        # Windows

The official setup page lists the key fingerprint and the full manifest verification steps.

Fix common install problems

SymptomFix
claude: command not foundOpen a new terminal; if it persists, add the install directory to PATH (see the official troubleshooting page)
syntax error near unexpected token '<' or a 403The download returned an error page; see the official install troubleshooting page for alternatives
Wrong shell errors on WindowsUse the PowerShell command in PowerShell and the CMD command in CMD
Alpine: not found errorsapk add bash curl libgcc libstdc++ ripgrep, then set USE_BUILTIN_RIPGREP=0
Search doesn’t workripgrep is usually bundled; see the search troubleshooting section of the docs
Anything elseRun claude doctor for read-only diagnostics, or /doctor inside a session

claude doctor checks install health, settings validation and the result of the last update attempt without starting a session. More answers in the Claude Code FAQ.

How to uninstall Claude Code

Native install, macOS/Linux/WSL:

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

Native install, Windows 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 remove settings too, delete ~/.claude and ~/.claude.json (and .claude/ plus .mcp.json in projects). This erases your settings, MCP configuration and session history, so back up anything you want to keep, such as skills and subagents you wrote.

Next steps

Once it runs, set up the essentials: a short CLAUDE.md, a couple of MCP servers and the slash commands you’ll use daily. When you’re ready to build a reusable setup, the Claude kit hub shows how.

Frequently asked questions

Does Claude Code work on Windows?

Yes. It runs natively on Windows 10 1809 or later and Windows Server 2019 or later, installed from PowerShell or CMD without admin rights, or inside WSL. Git for Windows is optional and lets Claude Code use Git Bash; without it Claude Code uses PowerShell. Sandboxing needs WSL 2.

How do I update Claude Code?

Native installs update automatically in the background. To update immediately, run claude update. Homebrew installs use brew upgrade claude-code, WinGet installs use winget upgrade Anthropic.ClaudeCode, and npm installs use npm install -g @anthropic-ai/claude-code@latest.

Do I need Node.js to install Claude Code?

No, unless you choose the npm method. The native installer, Homebrew, WinGet and Linux package managers need no Node.js. The npm package requires Node.js 22 or later, and even then the installed binary doesn't use Node at runtime.

Is Claude Code free to install?

The software is free to install, but using it requires a Claude Pro, Max, Team or Enterprise subscription, a Claude Console account billed per token, or a cloud provider such as Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry. The free Claude.ai plan doesn't include it.

Why does my terminal say claude is not found after installing?

The install directory isn't on your PATH yet. Open a new terminal window first. If it still fails, follow the PATH fix in the official install troubleshooting page; on macOS and Linux the native launcher lives at ~/.local/bin/claude.

Get the weekly Claude digest

New skills, MCP servers, prompts and Claude updates — one short email a week. No spam, unsubscribe anytime.

The newsletter is launching soon. Follow the RSS feed in the meantime.