Skip to content

Claude Code · Guide

How to install and update Claude Code

Every command on this page is copied from the official Anthropic documentation, listed at the end, and checked on 18 October 2026.

Quick answer: Native installs of Claude Code update themselves in the background. To update right now run claude update, and check your version with claude --version. To install, run curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux or WSL, or irm https://claude.ai/install.ps1 | iex in Windows PowerShell. The latest version is 2.1.302, released 16 October 2026.

Install Claude Code

The native installer is recommended and keeps itself up to date. No administrator rights are needed.

macOS, Linux, WSL

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

Windows PowerShell

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

Windows CMD

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

PowerShell shows PS C:\ in the prompt, CMD shows only C:\.

Other ways to install

Homebrew (stable channel; claude-code@latest for the latest channel)

brew install --cask claude-code

WinGet

winget install Anthropic.ClaudeCode

npm (needs Node.js 22 or later; do not use sudo)

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

Anthropic also publishes signed apt, dnf and apk repositories; the setup page lists the commands.

Sign in

Run claude and follow the browser prompts. Claude Code needs a Pro, Max, Team, Enterprise or Console account; the free claude.ai plan does not include it. To bill an API account instead of a subscription:

claude auth login --console

Check the login

claude auth status --text

Check your version

claude --version

The output looks like 2.1.302 (Claude Code). Inside a session, /status shows the version too, and claude doctor checks the installation and auto-update status.

Update Claude Code

Native installs check for updates on startup and while running, download them in the background and use them the next time you start Claude Code. To update now:

claude update

It prints the old and new version, or that Claude Code is already up to date. Package-manager installs do not update themselves; see the next section.

Update with a package manager

Homebrew

brew upgrade claude-code

WinGet

winget upgrade Anthropic.ClaudeCode

apt

sudo apt update && sudo apt upgrade claude-code

dnf

sudo dnf upgrade claude-code

apk

apk update && apk upgrade claude-code

npm (use install @latest, not npm update -g)

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

Latest or stable channel

The latest channel (the default) gets every release as it ships. The stable channel is typically about a week behind and skips releases with major regressions. Change it under /config → Auto-update channel, or in ~/.claude/settings.json:

{
  "autoUpdatesChannel": "stable"
}

Homebrew picks the channel by cask name and apt, dnf and apk by repository, not by this setting.

Install a specific version

macOS, Linux, WSL

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

Windows PowerShell

& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) 2.1.302

Or from an existing install

claude install 2.1.302

Turn off automatic updates

Add this to settings.json; claude update still works. DISABLE_UPDATES blocks manual updates as well.

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

Requirements

macOS 13 or later; Windows 10 1809+ or Windows Server 2019+ (64-bit only); Ubuntu 20.04+, Debian 10+ or Alpine 3.19+. At least 4 GB of RAM, an x64 or ARM64 processor, an internet connection and a country Anthropic supports.

Troubleshooting

command not found: claude: open a new terminal, then add the install folder to your PATH (zsh shown):

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

Find duplicate installs and diagnose

which -a claude
claude doctor

On Windows, 'irm' is not recognized means you are in CMD (use the CMD command), and an error about '&&' or 'fsSL' means you are in PowerShell (use irm https://claude.ai/install.ps1 | iex). Use where.exe claude to find duplicates.

Questions

How do I update Claude Code?
Native installs update automatically in the background. To update now, run claude update. Homebrew, WinGet, apt, dnf, apk and npm installs need their own upgrade command, such as brew upgrade claude-code or npm install -g @anthropic-ai/claude-code@latest.
How do I check the Claude Code version?
Run claude --version (or claude -v). Inside a session, /status shows it too.
Does Claude Code update automatically?
Yes for the native installer: it checks on startup and while running and installs updates in the background. Package-manager installs do not, unless you set CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE for Homebrew or WinGet.
What is the difference between the latest and stable channel?
latest (the default) gets every release immediately; stable is typically about a week behind and skips releases with major regressions. Switch in /config or with the autoUpdatesChannel setting.
How do I install Claude Code on Windows?
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. WinGet (winget install Anthropic.ClaudeCode) and WSL also work.

Sources

  1. Advanced setup (Claude Code docs)
  2. Troubleshoot installation (Claude Code docs)
  3. Authentication (Claude Code docs)
  4. CLI reference (Claude Code docs)
  5. anthropics/claude-code README

Computer mode

Prefer a retro PC?

Boot the Retro AI Tracker 98 desktop: every section as a window, a Games folder, the Start menu and a taskbar. The website stays the default.

Boot computer mode