AT AI Tool Jungle
claude codeanthropicinstallation

How to Install Claude Code on Mac, Windows and Linux (2026)

Install Claude Code with the official one-line installer, Homebrew, WinGet or apt/dnf, verify it works, sign in, and fix the most common setup errors.

AT AI Tool Jungle team · · 6 min read · 6 sources
Churchill Club Top 10 Tech Tech Trends Debate 2013 — I chose Deep Learning / Machine Learning
Photo: jurvetson (CC BY 2.0) via Openverse

To install Claude Code, open a terminal and run Anthropic’s official installer: curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux or WSL, or irm https://claude.ai/install.ps1 | iex in Windows PowerShell. Then open a new terminal, run claude --version to confirm it worked, and start it with claude inside a project folder to sign in with a paid Claude or Console account.

That covers most people. Below are the requirements, every official install method, how to sign in, and fixes for the errors people hit most often. Everything here is based on Anthropic’s own documentation as of October 2026; commands and requirements change often, so check the official setup page if something looks different.

Before you start: requirements

According to Anthropic’s setup documentation, Claude Code runs on:

  • macOS 13.0 or later
  • Windows 10 version 1809 or later, or Windows Server 2019 or later
  • Linux: Ubuntu 20.04+, Debian 10+, or Alpine Linux 3.19+
  • Hardware: at least 4 GB of RAM and an x64 or ARM64 processor
  • Shell: Bash, Zsh, PowerShell or CMD
  • An internet connection, and you must be in one of Anthropic’s supported countries

You also need the right account. Claude Code requires a Pro, Max, Team, Enterprise or Claude Console account; the free claude.ai plan does not include it. Organizations can instead route it through Amazon Bedrock, Google Cloud or Microsoft Foundry.

The native installer is what Anthropic recommends. It does not need Node.js, and it keeps itself up to date in the background.

macOS, Linux and WSL

  1. Open Terminal (or your WSL distribution’s shell).

  2. Run:

    curl -fsSL https://claude.ai/install.sh | bash
    
  3. Wait. The installer shows no progress bar while it downloads.

  4. Close the window, open a new one, and run claude --version.

On macOS and Linux the installer places the claude launcher at ~/.local/bin/claude.

Windows

First check which shell you’re in: PowerShell shows PS C:\... at the prompt, while CMD shows C:\... without the PS. You don’t need to run either as Administrator.

  1. In PowerShell, run:

    irm https://claude.ai/install.ps1 | iex
    
  2. In CMD, run instead:

    curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
    
  3. Open a new terminal window and run claude --version.

Anthropic recommends installing Git for Windows as well. With it, Claude Code can run shell commands through Git Bash; without it, Claude Code falls back to PowerShell. If you’d rather work in Linux, install inside WSL instead: open your WSL distribution, run the Linux command above, and always launch claude from the WSL terminal. The docs note that sandboxing is supported under WSL 2 but not on native Windows or WSL 1.

Other official install methods

If you prefer a package manager, these are all documented by Anthropic. The big difference is updates.

MethodCommandAuto-updates?
Native installercurl -fsSL https://claude.ai/install.sh | bashYes
Homebrew (macOS/Linux)brew install --cask claude-codeNo, run brew upgrade claude-code
WinGet (Windows)winget install Anthropic.ClaudeCodeNo, run winget upgrade Anthropic.ClaudeCode
apt / dnf / apk (Linux)Add Anthropic’s signed repository, then install claude-codeNo, upgrades come through your system updates
npmnpm install -g @anthropic-ai/claude-codeCan auto-update if npm’s global folder is writable

A few details worth knowing:

  • Homebrew has two casks. claude-code follows the stable channel, which the docs describe as typically about a week behind and skipping releases with major regressions. claude-code@latest gets every release as soon as it ships.
  • apt, dnf and apk use repositories at downloads.claude.ai, each with stable and latest channels. Follow the exact steps on the setup page, including verifying the signing key fingerprint before trusting it.
  • npm is where the sources disagree. The GitHub README labels npm installation as deprecated, while the setup docs still list it under advanced options and say it needs Node.js 22 or later. Either way, it’s not the preferred route. If you do use it, never run it with sudo; the docs warn that causes permission problems and security risks.

Verify the installation

Run:

claude --version

A working install prints a version number followed by (Claude Code). For a deeper check, run:

claude doctor

This prints read-only diagnostics, including install health, settings errors and the result of the last update attempt, without starting a session.

Sign in and start your first session

  1. In your terminal, move into a project folder: cd /path/to/your/project
  2. Start Claude Code by typing claude.
  3. Follow the prompts. For a Claude subscription or Console account, sign-in finishes in your browser.
  4. Once you see the Claude Code prompt, try something simple like “what does this project do?” Type /help to see available commands.

Your credentials are stored after the first login. To switch accounts later, type /login inside a session.

One thing that catches people out: if an ANTHROPIC_API_KEY environment variable is set on your machine and you approve it, Claude Code uses that key instead of your subscription. The Claude Help Center warns this means you’re billed for API usage rather than drawing on your plan’s included usage. If you meant to use your Pro or Max plan, remove the variable.

Prefer not to use the terminal?

Claude Code is also available as a desktop app, on the web at claude.ai/code, and inside editors. For VS Code, Anthropic’s extension docs say you need VS Code 1.94.0 or later: open the Extensions view (Ctrl+Shift+X or Cmd+Shift+X), search for “Claude Code” and click Install. The same extension works in Cursor, and a JetBrains plugin is available too. Note that the VS Code extension bundles its own private copy of the CLI and does not put claude on your PATH, so install the CLI separately if you also want it in a terminal.

Fixing common installation errors

Anthropic keeps a detailed troubleshooting page. These are the issues you’re most likely to hit.

“command not found: claude” or “‘claude’ is not recognized”

The install directory isn’t on your PATH yet. Open a new terminal window first, since windows that were already open (including terminals inside an editor) keep their old PATH. If it still fails on macOS with Zsh, the docs suggest:

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

On Linux with Bash, use ~/.bashrc instead of ~/.zshrc. Then run claude --version again.

“syntax error near unexpected token ’<’” or a 403 error

This means the install URL returned a web page or an error instead of the script. If the output mentions “App unavailable in region,” Claude Code isn’t available in your country. Otherwise it may be a temporary problem, a corporate proxy or a firewall. Anthropic suggests waiting a few minutes and retrying, checking your network connection, or using Homebrew or WinGet instead.

Wrong command for your Windows shell

If you see The token '&&' is not a valid statement separator, you ran the CMD command in PowerShell. If you see 'irm' is not recognized, you ran the PowerShell command in CMD. Switch to the matching command above.

Keeping it updated and uninstalling

Native installs check for updates on startup and in the background; run claude update to update immediately. You can switch to the slower “stable” channel through /config if you’d rather not get every release on day one.

To remove a native install on macOS, Linux or WSL:

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

For other methods use the matching package manager command, such as brew uninstall --cask claude-code or winget uninstall Anthropic.ClaudeCode. Your settings and session history live in ~/.claude and ~/.claude.json; only delete those if you want a completely clean slate, since the VS Code extension and desktop app also use that folder.

Frequently asked questions

Can I use Claude Code on the free Claude plan? +

No. Anthropic's setup docs say Claude Code requires a Pro, Max, Team, Enterprise or Console account, and that the free claude.ai plan does not include it. You can also connect it to Amazon Bedrock, Google Cloud or Microsoft Foundry if your organization uses those.

Do I need Node.js to install Claude Code? +

Not for the recommended native installer, Homebrew, WinGet or the Linux package repositories. Only the npm route needs Node.js, and the official docs list Node.js 22 or later for that package.

Why does my terminal say 'claude: command not found' after installing? +

Usually the install folder (~/.local/bin on macOS and Linux) is not on your PATH yet, or you are using a terminal window that was open before the install. Open a new terminal first; if that does not help, add the folder to your shell's PATH as described in Anthropic's troubleshooting page.

How do I update Claude Code? +

Native installs update themselves in the background, and you can force an update with claude update. Homebrew, WinGet and apt/dnf/apk installs do not auto-update by default, so use brew upgrade, winget upgrade or your system package manager.

Should I install Claude Code with npm? +

Anthropic no longer recommends it. The GitHub README marks npm installation as deprecated, while the setup docs still document it as an advanced option, so use the native installer or a package manager unless you have a specific reason.

Sources

  1. Advanced setup - Claude Code Docs (code.claude.com)
  2. Quickstart - Claude Code Docs (code.claude.com)
  3. Troubleshoot installation and login - Claude Code Docs (code.claude.com)
  4. anthropics/claude-code README on GitHub (github.com)
  5. Use Claude Code with your Pro or Max plan - Claude Help Center (support.claude.com)
  6. Use Claude Code in VS Code - Claude Code Docs (code.claude.com)
About this guide. Researched and drafted with AI assistance from the sources above, then checked against our editorial rules. It reflects what was publicly known on October 17, 2026; details can change, so confirm with the official source before acting on it. How we work →

Our reviews

In-depth reviews from AI Tool Jungle that go with this topic.

Keep reading