How to Install Claude Code in 2026 (Mac, Windows, Linux)
How to install Claude Code
To install Claude Code, run the native installer for your operating system. On macOS, Linux, or WSL, run curl -fsSL https://claude.ai/install.sh | bash. On Windows PowerShell, run irm https://claude.ai/install.ps1 | iex. Then start it by typing claude in any project folder and log in when the browser prompt opens. The native installer needs no Node.js, takes under two minutes, and updates itself in the background.
One prerequisite catches people out: Claude Code requires a paid Claude account (Pro, Max, Team, Enterprise, or a pay-per-token Console API key). The free Claude.ai chat plan does not include Claude Code access. Everything else, the commands, the verification step, and the per-platform details, is below. If you want the bigger picture before installing, our introduction to Claude Code explains what the tool actually does.
Installation methods compared
There are several ways to install Claude Code in 2026. The native installer is the method Anthropic recommends and tests against, because it auto-updates and needs no separate runtime. Pick one row:
| Method | Command | Platforms | Auto-updates | Node.js needed |
|---|---|---|---|---|
| Native installer (recommended) | curl -fsSL https://claude.ai/install.sh | bash |
macOS, Linux, WSL | Yes | No |
| Native installer (Windows) | irm https://claude.ai/install.ps1 | iex |
Windows PowerShell | Yes | No |
| Homebrew | brew install --cask claude-code |
macOS, Linux | No (manual) | No |
| WinGet | winget install Anthropic.ClaudeCode |
Windows | No (manual) | No |
| npm | npm install -g @anthropic-ai/claude-code |
All | No (manual) | Yes (18+) |
The npm package still works and installs the same underlying binary, but it is no longer the primary path Anthropic tests, and it requires manual upgrades. Use it only if you already manage your tooling through npm and want everything in one place.
Before you install: prerequisites
Two boxes to tick before running any command.
1. A supported system. Claude Code runs on:
- macOS 13.0 or later
- Windows 10 (build 1809+) or Windows Server 2019+
- Ubuntu 20.04+, Debian 10+, or Alpine Linux 3.19+
- 4 GB+ RAM, x64 or ARM64 processor
- An internet connection (Claude Code talks to Anthropic's servers; it is not a local model)
2. A paid Claude account. This is the step most install guides bury. Claude Code requires one of:
- A Claude Pro subscription ($20/month)
- A Claude Max subscription ($100 or $200/month)
- A Team or Enterprise plan
- An Anthropic Console account with a funded API balance (pay-per-token, for automation and scripting)
The free Claude.ai plan does not unlock Claude Code. If you are not sure which plan fits, the Claude Code pricing breakdown compares every tier, and the Claude Code subscription guide covers how subscription billing differs from API billing.
You do not need Node.js for the native installer, Homebrew, or WinGet. You only need Node.js 18+ if you choose the npm method.
Step 1: Run the install command for your OS
Open a terminal and paste the command that matches your platform.
Install Claude Code on macOS
The native installer is the simplest path and needs no Homebrew or Node.js:
curl -fsSL https://claude.ai/install.sh | bash
If you prefer Homebrew, the cask works too:
brew install --cask claude-code
Note that Homebrew installs do not auto-update; you upgrade them with brew upgrade claude-code. The native installer keeps itself current automatically, which is why it is the recommended route. For Mac-specific notes (PATH, shell config, Apple Silicon), see our Claude Code Mac setup guide.
Install Claude Code on Windows
Claude Code runs natively on Windows in 2026. You do not need WSL, Node.js, or npm. Open PowerShell and run:
irm https://claude.ai/install.ps1 | iex
If you are in Command Prompt (CMD) rather than PowerShell, the simplest path is to switch to PowerShell (search "PowerShell" in the Start menu) and run the command above. Alternatively, use WinGet directly from CMD:
winget install Anthropic.ClaudeCode
A quick way to tell which terminal you are in: PowerShell shows PS C:\ at the prompt, while CMD shows C:\ without the PS.
Installing Git for Windows is optional but recommended, because it gives Claude Code a Bash shell to run commands through. Without it, Claude Code falls back to its PowerShell tool, which works fine for most workflows. The full Windows walkthrough, including the WSL alternative, is in our Claude Code Windows setup guide.
Install Claude Code on Linux
The same native installer covers every supported distribution:
curl -fsSL https://claude.ai/install.sh | bash
Anthropic also publishes signed apt, dnf, and apk repositories if you prefer your system package manager. For example, on Alpine and other musl-based distributions you may need to install libgcc, libstdc++, and ripgrep first, then set USE_BUILTIN_RIPGREP=0. Our Claude Code Linux setup guide covers the package-manager routes and the musl edge cases in detail.
Install Claude Code with npm (optional)
If you manage your CLI tools through npm, the global package is still supported. It requires Node.js 18 or later:
npm install -g @anthropic-ai/claude-code
Do not prefix this with sudo. A sudo npm install -g is the single most common cause of permission errors and is a security risk. To upgrade later, run npm install -g @anthropic-ai/claude-code@latest (avoid npm update -g, which can leave you on an older release). The npm package pulls in the same native binary the standalone installer uses, so you get identical behaviour, just with manual upgrades.
Step 2: Verify the installation
Once the command finishes, confirm Claude Code is on your PATH:
claude --version
You should see a version number printed back. If you get command not found, close and reopen your terminal so it picks up the updated PATH, then try again. For a deeper health check that inspects your install and configuration, run:
claude doctor
claude doctor reports your version, install method, the result of the last update attempt, and any configuration issues. It is the first command to run whenever something looks off. If the install genuinely failed, with an EACCES permission wall, a missing binary, or a Node version complaint, our guide to a failed Claude Code installation maps each symptom to its fix.
Step 3: Authenticate
Navigate into a project folder and start Claude Code:
claude
On first run, Claude Code opens your browser to log in. Sign in with the Claude account tied to your Pro, Max, Team, or Enterprise subscription, and you are ready to go. If you are using the API instead of a subscription, log in with your Anthropic Console credentials.
A few useful authentication commands once you are inside a session:
/loginswitches accounts or signs in if you skipped it at startup/logoutsigns out so you can re-authenticate/costshows token usage and cost for the current session
If you have an active subscription but also have ANTHROPIC_API_KEY set in your environment, the API key takes precedence. That trips people up, because if the key belongs to an expired or unfunded organisation, authentication fails even though your subscription is fine. Unset the variable to fall back to your subscription login.
Step 4: Run your first command
With Claude Code authenticated, you can talk to it in plain English from inside your project:
claude
> explain what this codebase does
Claude reads your files, understands the structure, and answers. From there it can write code, run tests, fix bugs, and handle git workflows, all from the terminal. For a guided tour of the core commands and the everyday workflow, read how to use Claude Code.
Keeping Claude Code updated
How you update depends on how you installed:
- Native installer: updates automatically in the background. To force one immediately, run
claude update. - Homebrew:
brew upgrade claude-code - WinGet:
winget upgrade Anthropic.ClaudeCode - npm:
npm install -g @anthropic-ai/claude-code@latest - apt / dnf / apk: updates arrive through your normal system upgrade workflow
This is the strongest practical argument for the native installer: you install once and never think about versions again. The package-manager routes trade auto-updates for fitting into your existing tooling.
Common install problems and fixes
Most install issues fall into a handful of buckets:
claude: command not found after install. Your terminal has a stale PATH. Close it, open a fresh one, and try claude --version again. If it persists, claude doctor will list the fix.
'irm' is not recognized on Windows. You ran the PowerShell command in CMD. Either switch to PowerShell, or use the CMD command shown in Step 1.
Permission errors during an npm install. You used sudo, or your npm global directory is not writable. Reinstall without sudo, or switch to the native installer to sidestep npm permissions entirely.
"Claude Code requires a paid plan." You are logged into the free Claude.ai tier. Upgrade to Pro, Max, or a Console API account, then run /login.
Search or file discovery fails. Claude Code bundles ripgrep, but on some musl-based Linux distributions you must install it separately and set USE_BUILTIN_RIPGREP=0.
For anything not listed here, claude doctor is the diagnostic command, and the installation troubleshooting guide covers the rarer cases symptom by symptom.
What to do after installing
Installing Claude Code is the easy part. Getting genuinely useful output from it comes from configuration. Out of the box, Claude Code is capable but generic: it does not know your codebase conventions, does not remember last week's decisions, and does not follow your deployment process.
The highest-leverage next step is a CLAUDE.md file in your project root, the onboarding document Claude reads at the start of every session. After that, a memory file for cross-session continuity, then custom skills and hooks. Our complete Claude Code setup guide walks through every configuration layer in order, with examples.
This configuration step is where Claudify fits in. Claudify is a pre-built operating system for Claude Code: a ready-made stack of skills, persistent memory, hooks, and specialist agents that installs in one command, so you skip days of manual setup and get a battle-tested configuration from the first session. It enhances whatever Claude plan you are on rather than replacing it. See what's included.
Frequently asked questions
Is Claude Code free to install?
The install itself is free, but Claude Code requires a paid Claude account to run. The minimum is Claude Pro at $20/month, which includes terminal access. The free Claude.ai chat plan does not unlock Claude Code. You can also use it with a pay-per-token Anthropic Console API key instead of a subscription, which suits automation and scripted use. See the Claude Code pricing breakdown for every tier.
Do I need Node.js to install Claude Code?
No, not for the recommended methods. The native installer, Homebrew, and WinGet all install a standalone binary with no Node.js dependency. You only need Node.js 18 or later if you specifically choose the npm method (npm install -g @anthropic-ai/claude-code). For most people, the native installer is simpler and updates itself automatically.
Can I install Claude Code on Windows without WSL?
Yes. As of 2026, Claude Code runs natively on Windows 10 (build 1809+) and Windows 11. Run irm https://claude.ai/install.ps1 | iex in PowerShell, or use WinGet. You do not need WSL, Node.js, or npm. Installing Git for Windows is optional and gives Claude Code a Bash shell; without it, Claude Code uses its built-in PowerShell tool. WSL remains available if you specifically want a Linux toolchain or sandboxed command execution.
How do I verify Claude Code installed correctly?
Run claude --version to confirm the binary is on your PATH and see the installed version. For a fuller check, run claude doctor, which inspects your installation and configuration and reports the result of the last update attempt. If claude --version returns command not found, restart your terminal so it reloads the updated PATH, then try again.
How do I update Claude Code after installing?
Native installations update automatically in the background; run claude update to apply one immediately. Homebrew uses brew upgrade claude-code, WinGet uses winget upgrade Anthropic.ClaudeCode, and npm uses npm install -g @anthropic-ai/claude-code@latest. Linux package-manager installs update through your normal system upgrade workflow. The native installer is the only method that stays current without any action from you.
Summary
Installing Claude Code in 2026 is a two-minute job once you know the right command:
- macOS, Linux, WSL:
curl -fsSL https://claude.ai/install.sh | bash - Windows PowerShell:
irm https://claude.ai/install.ps1 | iex - Homebrew:
brew install --cask claude-code - WinGet:
winget install Anthropic.ClaudeCode - npm (needs Node.js 18+):
npm install -g @anthropic-ai/claude-code
Verify with claude --version, then run claude and log in with a paid Claude account (Pro, Max, Team, Enterprise, or Console API). The native installer is the recommended path because it needs no Node.js and updates itself.
The real productivity gain, though, comes after the install, in how you configure Claude Code. Start with a CLAUDE.md file, add memory, then skills and hooks. The complete setup guide covers it step by step, or if you want the whole configured stack in one command, get Claudify.
Further reading:
- What is Claude Code? - what the tool does before you install it
- How to use Claude Code - core commands and the everyday workflow
- Claude Code setup guide - configure Claude Code for real productivity
- Claude Code pricing breakdown - every plan compared
- Failed Claude Code installation - fix install errors by symptom
More like this
Ready to upgrade your Claude Code setup?
Get Claudify