How to Install Claude Code on Mac, Windows, and Linux
A step-by-step guide to installing Claude Code: the recommended native installer, Homebrew, WinGet, and npm; which account you need; signing in; checking it works with claude doctor; updating; and fixing the install problems beginners hit most often.
Claude Code runs in your terminal (and in VS Code, JetBrains, and the Claude desktop app). Installing it takes a couple of minutes. This guide covers the options, based on Anthropic's documentation as of September 2026. If you've never used a terminal before, read The Terminal for Beginners first.
What you need
- A paid Claude account: Pro, Max, Team, or Enterprise — or a Claude Console (API) account. The free Claude plan doesn't include Claude Code. (Claude Pro vs Max vs API for Claude Code.)
- A supported system: macOS 13 or later; Windows 10 (version 1809) or later; or Linux such as Ubuntu 20.04+, Debian 10+, or Alpine 3.19+.
- 4 GB of RAM or more and an internet connection.
Option 1: the native installer (recommended)
The native installer keeps itself up to date automatically in the background.
macOS, Linux, or WSL:
curl -fsSL https://claude.ai/install.sh | bash
Windows PowerShell:
irm https://claude.ai/install.ps1 | iex
Windows Command Prompt (CMD):
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Not sure which Windows terminal you're in? If the prompt starts with PS, it's PowerShell. 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.
Option 2: a package manager
Homebrew (macOS):
brew install --cask claude-code
This cask follows the stable channel, typically about a week behind the newest release. claude-code@latest follows the latest one.
WinGet (Windows):
winget install Anthropic.ClaudeCode
Homebrew and WinGet installs don't auto-update. Update with brew upgrade claude-code or winget upgrade Anthropic.ClaudeCode.
Signed apt, dnf, and apk repositories are also available for Debian/Ubuntu, Fedora/RHEL, and Alpine; see Anthropic's setup docs for the repository lines.
Option 3: npm
If you already use Node.js:
npm install -g @anthropic-ai/claude-code
Current versions of the npm package expect Node.js 22 or later. Don't use sudo with this command — if you get permission errors, fix your Node setup with a version manager instead. (What Is Node.js?.)
Windows: native or WSL?
Claude Code runs natively on Windows — from PowerShell or CMD, no administrator rights needed. Installing Git for Windows is optional but recommended: with it, Claude Code can use Git Bash to run shell commands; without it, it uses PowerShell.
If your projects live in WSL (Windows Subsystem for Linux), install Claude Code inside WSL using the Linux command, and run it from the WSL terminal. WSL 2 also supports Claude Code's command sandboxing, which native Windows doesn't.
Check it worked
Open a new terminal window and run:
claude --version
You should see a version number followed by (Claude Code). For a fuller health check — install status, settings problems, update status — run:
claude doctor
Sign in and start
Go to a project folder and start Claude Code:
cd path/to/your/project
claude
The first time, it opens your browser to sign in with your Claude account. Then you're in an interactive session: type what you want in plain English. A good first request is:
Explain what this project does and how it's structured.
Then try /init, which has Claude Code look at your project and draft a CLAUDE.md file of instructions for future sessions. (How to Write a CLAUDE.md.)
Fixing common problems
command not found: claude — the terminal can't find it. Close and reopen the terminal first. If it's still missing, the install location (~/.local/bin on macOS and Linux) may not be on your PATH; the installer normally prints instructions for adding it.
Two versions fighting — if you installed with both npm and the native installer, you may be running an old copy. claude doctor reports conflicting installations; remove the one you don't want.
Corporate network errors (403s, certificate errors) — company proxies and firewalls can block the download or sign-in. Anthropic's troubleshooting docs cover proxy settings.
"Claude Code isn't available on my plan" — check you're signed in with a Pro, Max, Team, Enterprise, or Console account, not a free one.
Updating and uninstalling
The native install updates itself; claude update forces an immediate update. To uninstall, use the package manager you installed with (brew uninstall --cask claude-code, winget uninstall Anthropic.ClaudeCode, npm uninstall -g @anthropic-ai/claude-code). For the native installer, delete ~/.local/bin/claude and ~/.local/share/claude. Your settings live in ~/.claude.
Next steps
- Claude Code Slash Commands — the commands worth knowing on day one.
- Claude Code Permission Modes — how much it can do without asking.
- What Is Claude Code? — the bigger picture.
EasySpawn gives you a persistent cloud workspace with Claude Code already installed — sign in with your own Claude subscription and start from any browser, no local install required. See how it works or join the waitlist.
Related: Run Claude Code on a Remote Server · Use Claude Code From Your Phone · The Terminal for Beginners
Keep reading
Claude Code Slash Commands: The Ones Worth Knowing on Day One
Claude Code has dozens of built-in slash commands. The dozen a beginner actually needs — /init, /clear, /compact, /context, /usage, /model, /resume, /rewind, /plan, /diff, /permissions, /help — what each does, when to use it, and how to make your own.
How to Write Good Commit Messages (and Why It Matters With AI)
'fix', 'update', and 'wip' tell you nothing six months later. What a commit message is for, the simple format most teams use, examples of good and bad messages, how often to commit when an AI tool is making the changes, and how to get Claude Code to write useful ones.