To install Claude Code, you run one official command in your terminal: Anthropic’s native installer for macOS, Linux and WSL, or the PowerShell or Command Prompt version on Windows. Pick your setup below and this free helper shows the exact commands, how to check the install worked, how to sign in and stay updated, and the official fix for the error you’re seeing.
One thing to know first: Claude Code needs a paid Claude plan (Pro, Max, Team or Enterprise) or a Claude Console account. The free Claude plan doesn’t include it.
Free install helper
Install Claude Code: your exact commands
Pick your computer, shell and install method. You get the official install command, how to check it worked, how to sign in and update, and fixes for the errors people hit most. Copy each step as you go.
Get the Claude Code starter cheat sheet
Unlock a printable one-page cheat sheet: the commands, slash commands, keyboard shortcut and starter settings you will use in your first week.
Unlocked: your cheat sheet is just below. You are also on the weekly HOW TO // AI newsletter.
Free. You also get the HOW TO // AI newsletter once a week. Unsubscribe any time.
After it works: three good first moves
- Open a project and ask a first question, like what does this project do? Claude Code reads your files and answers.
- Run
/initto create a CLAUDE.md file. Claude Code reads it at the start of every session, so put your build commands and house rules there. - Decide what Claude Code may do without asking. Build a safe permissions file rather than turning approvals off.
New to it? Read how to use Claude Code, step by step.
Sources: Claude Code: Advanced setup, Claude Code: Quickstart, Claude Code: Troubleshoot installation and login, Claude Code: CLI reference, Claude Code: Commands, Claude Code: Settings, Claude pricing, checked October 18, 2026. Commands change often: if one fails, check the official setup page.
How to use the install helper
- Pick your computer: macOS, Windows, Linux or WSL. On Windows, also pick PowerShell or Command Prompt, because each needs a different command.
- Pick an install method. The native installer is Anthropic’s recommended option and keeps itself updated.
- Copy each step in order: install, check the version in a new terminal window, then start Claude Code in a project and sign in.
- If something fails, pick the exact error message and follow the fix for your setup.
The official install commands
These are the commands from Anthropic’s setup guide. The helper above adds the right one for your shell, release channel and package manager.
- macOS, Linux and WSL: curl -fsSL https://claude.ai/install.sh | bash
- Windows PowerShell: irm https://claude.ai/install.ps1 | iex
- Homebrew on a Mac: brew install –cask claude-code
- WinGet on Windows: winget install Anthropic.ClaudeCode
- npm (needs Node.js 22 or later): npm install -g @anthropic-ai/claude-code
Signed apt, dnf and apk packages are also published for Debian, Ubuntu, Fedora, RHEL and Alpine. Pick Linux in the helper to get those.
Which install method should you pick?
| Method | Updates itself? | Good for |
|---|---|---|
| Native installer | Yes, in the background | Almost everyone. Anthropic recommends it. |
| Homebrew | No: run brew upgrade | Mac users who manage everything with Homebrew |
| WinGet | No: run winget upgrade | Windows users who prefer a package manager |
| apt, dnf or apk | No: comes with system updates | Linux servers and shared machines |
| npm | No: reinstall with @latest | Teams that already standardize on npm |
Homebrew offers two versions: claude-code follows the stable channel, which is about a week behind and skips releases with major problems, and claude-code@latest gets every release as soon as it ships. The native installer takes the same choice: add stable to the command, or switch later in /config.
Check that it worked
Open a brand-new terminal window and run claude –version. A working install prints a version number followed by (Claude Code). For a deeper check, claude doctor reports install health and settings problems without starting a session. Then go to a project folder, type claude, and follow the browser prompts to log in. You only do that once.
The errors people hit most
- command not found: claude: the install worked but its folder (~/.local/bin, or %USERPROFILE%\.local\bin on Windows) isn’t on your PATH yet. Open a new terminal first, then add the folder to your PATH.
- ‘irm’ is not recognized: you’re in Command Prompt, not PowerShell. Use the CMD command instead, or open PowerShell.
- syntax error near unexpected token, or a 403: the download returned a web page instead of the script. Retry later, check your network or proxy, or use Homebrew or WinGet.
- Killed on a small Linux server: the install ran out of memory. Claude Code needs 4 GB of RAM; add swap space or use a bigger instance.
- This organization has been disabled: an old ANTHROPIC_API_KEY in your shell is overriding your subscription. Remove it and log in again.
Once it runs, decide what Claude Code may do without asking. Our Claude Code permissions builder makes a safe settings file in a minute, so you don’t need to turn approvals off.
Related on HOW TO // AI
- How to use Claude Code: a step-by-step beginner’s guide once it’s installed.
- Claude pricing and Claude Pro vs Max: which plan gives you enough Claude Code usage.
- Cursor vs Claude Code: still deciding which coding agent to use?
- Claude Developer study guide: turn your Claude Code skills into a certification.
Checked against Anthropic’s Claude Code setup, quickstart and installation troubleshooting docs and the Claude pricing page on October 18, 2026.
Frequently asked questions
How do I install Claude Code on Windows?
Open PowerShell and run irm https://claude.ai/install.ps1 | iex, or use winget install Anthropic.ClaudeCode. You don't need Administrator rights. Git for Windows is optional but recommended so Claude Code can use Bash.
Do I need Node.js to install Claude Code?
No. The native installer, Homebrew and WinGet don't need Node.js. Only the npm method does, and it needs Node.js 22 or later.
Is Claude Code free?
The tool is free to install, but using it needs a paid Claude plan (Pro, Max, Team or Enterprise) or a Claude Console account billed for API usage. The free Claude plan doesn't include Claude Code.
How do I update Claude Code?
Native installs update themselves in the background, and claude update installs the newest version right away. Homebrew, WinGet, npm and Linux package installs need their own upgrade command.
Why does it say command not found after installing?
The install folder isn't on your PATH yet. Open a new terminal window first. If it still fails, add ~/.local/bin (or %USERPROFILE%.localbin on Windows) to your PATH, which the helper above shows for your shell.
