Claude Code Install and Setup Guide (2026)

SYS.GUIDES

Claude Code Install and Setup Guide (2026)

Install Claude Code on macOS, Linux, native Windows, or WSL. Compare the native installer, Homebrew, WinGet, npm, login, updates, and PATH fixes.

|Aditya Bawankule|9 min read
Claude CodeAnthropicAI CodingWindowsmacOSLinux
ON THIS PAGE

Install Claude Code with Anthropic's native installer on macOS, Linux, or WSL, or use the PowerShell installer on native Windows. The native path is the recommended default because it installs a standalone binary, updates automatically, and does not require Node.js.

This guide gives you the current command for each operating system, explains when Homebrew, WinGet, npm, or WSL makes more sense, and fixes the PATH and shell errors that cause most failed setups. Once it works, use the complete Claude Code tutorial for CLAUDE.md, plan mode, hooks, subagents, and daily workflows.

Claude Code Install: Quick Answer

Run the installer for your operating system, verify the binary, then start claude inside a project folder. These are the shortest supported paths.

On macOS, Linux, or WSL:

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

On Windows PowerShell:

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

Anthropic maintains the live commands in its official Claude Code setup documentation. Check that page before automating an installation across many machines.

What You Need Before Installing

You need a supported 64-bit operating system, a terminal, internet access to Anthropic's download and login services, and an account that can use Claude Code. The recommended native installers do not require Node.js.

  • macOS: Apple Silicon or Intel with a normal terminal such as Terminal, iTerm2, or Warp.
  • Linux: a supported x64 or ARM64 distribution. Alpine and other musl-based systems also need libgcc, libstdc++, and ripgrep.
  • Windows: 64-bit Windows. Git for Windows is recommended for Bash-based tools, but current Claude Code can also use PowerShell.
  • Account: Pro, Max, Team, Enterprise, Claude Console, or a supported cloud provider account.

The free Claude.ai plan does not include Claude Code. If you have not chosen a plan yet, compare the fixed subscriptions and API option in my Claude Code pricing and limits guide.

Choose the Right Install Method

Choose the native installer unless your team already manages software through Homebrew, WinGet, or npm. Every method installs the same Claude Code command, but updates and prerequisites differ.

MethodBest forNode requiredUpdates
Native installerMost individual developersNoAutomatic
HomebrewManaged macOS setupsNoRun brew upgrade
WinGetManaged Windows setupsNoRun winget upgrade
npmExisting Node-based provisioningYesRun npm update

Install Claude Code on macOS

Install Claude Code on macOS with the native script for automatic updates, or with Homebrew when you want package-manager control. Both work on Apple Silicon and Intel Macs.

Native Installer

The native installer is the simplest macOS option and Anthropic's recommended default. Open Terminal and run:

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

Close and reopen the terminal if the command is not immediately available. The installer normally places the binary at ~/.local/bin/claude and configures it to receive background updates.

Homebrew

Use Homebrew when you already manage developer tools through brew and prefer explicit upgrades. The stable cask typically trails the latest release channel to avoid major regressions.

brew install --cask claude-code
brew upgrade claude-code

Anthropic also publishes a claude-code@latest cask for immediate releases. Pick one channel and keep only one installation so an older binary does not win PATH resolution.

Install Claude Code on Linux

Install Claude Code on Linux with the native script. It detects the supported architecture, downloads the matching binary, and configures the command for your user account.

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

Debian, Fedora, RHEL, and Alpine package paths are also documented by Anthropic, but the native script is the portable starting point. On Alpine, install its runtime dependencies first:

apk add libgcc libstdc++ ripgrep

If a small cloud VM prints Killed during installation, it is usually out of memory. Anthropic currently recommends at least 4 GB of available RAM for the install path, or adding swap before retrying.

Install Claude Code on Windows

Claude Code now runs either natively on 64-bit Windows or inside WSL. Native Windows is best for Windows-native projects; WSL 2 is better for Linux toolchains and sandboxed command execution.

Native Windows

Install natively from PowerShell with Anthropic's script, or use WinGet if that is how you manage Windows applications. You do not need administrator privileges for the PowerShell installer.

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

The WinGet alternative is:

winget install Anthropic.ClaudeCode

Git for Windows is recommended because Claude Code can use Git Bash for shell operations. If Git Bash is absent, current releases can use PowerShell instead. Restart the terminal after installing so the new PATH entry is loaded.

WSL

Install inside WSL when the project and toolchain live in Linux. Open the WSL distribution, run the Linux installer there, and launch Claude Code from the WSL terminal rather than PowerShell.

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

WSL 2 supports Claude Code sandboxing; WSL 1 does not. WSL also avoids needing Git for Windows because the Linux environment supplies its own shell and Git installation.

Verify and Log In

Verify the executable first, then run Claude Code and complete the browser login. These two checks separate install problems from account or authentication problems.

claude --version
claude doctor
claude

claude --version proves the shell can find and execute the binary. claude doctor checks installation health and common configuration problems. The first plain claude launch opens a browser for authentication; follow the prompt and return to the terminal.

Start Claude Code from the repository you want it to work on. It reads the current directory as project context, so launching from a broad parent folder exposes more files than necessary.

How Claude Code Updates

Native installations update automatically in the background. Homebrew, WinGet, and npm installations stay on the version installed by their package manager until you upgrade them.

brew upgrade claude-code
winget upgrade Anthropic.ClaudeCode
npm update -g @anthropic-ai/claude-code

Run claude --version after an upgrade. If the version does not change, inspect the PATH for duplicate installations before reinstalling anything.

Fix Common Install Errors

Most Claude Code installation failures come from PATH configuration, using the command for the wrong Windows shell, or keeping two installations active. Anthropic's installation troubleshooting reference maps the exact error text to current fixes.

claude: Command Not Found

A command-not-found error means the binary is absent from PATH or the terminal has not reloaded its PATH yet. Restart the terminal, then confirm the install directory and binary.

# macOS or Linux
ls -la ~/.local/bin/claude
echo $PATH

# Windows PowerShell
Test-Path "$env:USERPROFILE\.local\bin\claude.exe"
Get-Command claude

Anthropic's native install path is ~/.local/bin/claude on macOS or Linux and %USERPROFILE%\.local\bin\claude.exe on Windows. Add that directory to your user PATH if the binary exists but the shell cannot find it.

Wrong Windows Shell Command

Use the PowerShell installer only in PowerShell and the CMD installer only in CMD. If irm is not recognized, you are probably in CMD; if && is rejected, you are probably in PowerShell.

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

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

Conflicting Installations

Keep one Claude Code installation and remove stale copies when the wrong version launches. First list every binary your shell can see.

# macOS or Linux
which -a claude

# Windows
where.exe claude

Common conflicts are a native binary plus an older global npm package, or a Homebrew cask plus the native installer. Decide which update path you want before uninstalling the extras.

What to Do After Setup

After installation, open a real repository, ask Claude Code to explain the project before editing it, and add integrations only when a task needs them. A working minimal setup is easier to debug than a client loaded with unverified extensions.

The complete Claude Code guide covers the daily workflow. If you want Claude to reach external tools, read what an MCP server is before adding one, then use the online MCP Inspector to inspect a remote server's tools, resources, and prompts.

For deeper debugging after you begin using the agent, the Claude Code Session Viewer opens local JSONL transcripts in the browser and keeps the file on your device.

FREQUENTLY ASKED QUESTIONS

Which Claude Code install method should I use?

Use Anthropic's native installer for macOS, Linux, or WSL, and PowerShell or WinGet for native Windows. Homebrew is a good macOS alternative when you prefer package-manager updates. npm still works, but the native installer is the recommended default.

Can I install Claude Code on Windows?

Yes. Claude Code runs natively on 64-bit Windows through PowerShell, CMD, or Git Bash, and it also runs inside WSL 1 or WSL 2. Use WSL 2 when your project uses a Linux toolchain or you want sandboxed command execution.

Does Claude Code require Node.js?

No, not with the recommended installers. The standalone installer, Homebrew cask, and WinGet package install a native binary. Node.js is only required if you choose the npm installation path.

Why is the claude command not found after installation?

The install directory is probably missing from PATH, or an older installation is taking priority. Restart the terminal, run claude --version, and check ~/.local/bin on macOS or Linux and %USERPROFILE%\.local\bin on Windows.

Is Claude Code free to install?

The installer is free, but using Claude Code requires a paid Claude plan, a Claude Console account with API billing, or a supported cloud provider. The free Claude.ai plan does not include Claude Code.