To install Claude Code, open a terminal and run Anthropic’s native installer: one command on macOS, Linux or WSL, and a slightly different one in Windows PowerShell or CMD. The install takes a minute or two, and after that you type claude inside a project folder to start.
The exact commands for each system are below, along with what you need before you begin, how to sign in, and how to fix the handful of errors that trip up most first-time installs.
What You Need Before You Install Claude Code
- A supported operating system: macOS 13 or later, Windows 10 version 1809 or later, Ubuntu 20.04 or later, Debian 10 or later, or Alpine Linux 3.19 or later.
- Hardware: at least 4 GB of RAM and an x64 or ARM64 processor.
- An internet connection. Claude Code talks to Anthropic’s servers while it works.
- A paid Claude account. Claude Code works with Pro, Max, Team and Enterprise plans, or with a Claude Console account billed by usage. The free Claude plan does not include it.
You do not need Node.js for the recommended install. The native installer is a standalone program.
How to Install Claude Code on Mac, Linux or WSL
- Open the Terminal app. On Windows with WSL, open your Linux distribution.
- Paste this command and press Enter:
curl -fsSL https://claude.ai/install.sh | bash
- When it finishes, close the terminal and open a new one so the new command is picked up.
- Check that it worked:
claude --version
A working install prints a version number followed by “(Claude Code)”.
How to Install Claude Code on Windows Without WSL
Claude Code runs natively on Windows, so WSL is optional. You do not need to run the terminal as Administrator. Which command you use depends on which terminal you have open.
In PowerShell (your prompt starts with PS):
irm https://claude.ai/install.ps1 | iex
In Command Prompt (no PS at the start of the prompt):
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Open a new terminal window afterwards and run claude –version to confirm.
Anthropic recommends also installing Git for Windows. It is optional, but it gives Claude Code a Bash shell to run commands in. Without it, Claude Code uses PowerShell instead.
Starting Claude Code and Signing In for the First Time
- In your terminal, move into the folder of the project you want to work on.
- Type claude and press Enter.
- A browser window opens. Sign in with your Claude account and approve the connection.
- Return to the terminal. You can now describe what you want done in plain English.
Usage counts against your plan’s limits or, on a Console account, is billed by the token. If that term is new, our guide to what tokens are in AI and why they cost money explains how that billing works.
Other Ways to Install Claude Code: Homebrew, WinGet and npm
| Method | Command | Updates itself? |
|---|---|---|
| Native installer (recommended) | See the commands above | Yes, in the background |
| Homebrew (macOS, Linux) | brew install –cask claude-code | No, run brew upgrade claude-code |
| WinGet (Windows) | winget install Anthropic.ClaudeCode | No, run winget upgrade Anthropic.ClaudeCode |
| npm | npm install -g @anthropic-ai/claude-code | Depends on permissions |
The npm route needs Node.js 22 or later and installs the same program as the native installer. Do not put sudo in front of the npm command. Anthropic warns that it causes permission problems and security risks. Debian, Fedora, RHEL and Alpine users can also install through apt, dnf or apk using the repositories listed in the official Claude Code setup guide.
How to Check That Claude Code Installed Correctly
Two commands tell you everything you need:
claude --version
claude doctor
The first prints the installed version. The second runs a read-only health check and lists any problems with your install or settings, along with suggested fixes.
Common Claude Code Install Errors and How to Fix Them
“claude” is not recognized or command not found
The install folder is not on your PATH yet. Close every terminal window and open a fresh one first. If it still fails, follow the PATH fix in Anthropic’s troubleshooting page, which is linked from the setup guide.
The token “&&” is not a valid statement separator
You pasted the Command Prompt command into PowerShell. Use the PowerShell command instead.
“irm” is not recognized as an internal or external command
The opposite problem. You are in Command Prompt, so use the CMD command.
You are told your account does not have access
Check that you signed in with the account that has a paid plan. The free plan cannot use Claude Code.
How to Update or Uninstall Claude Code
Native installs update automatically. To update right now, run claude update. Homebrew and WinGet installs need their own upgrade commands, shown in the table above.
To remove a native install on macOS or Linux, delete the program and its version files:
rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claude
For Homebrew use brew uninstall –cask claude-code, for WinGet use winget uninstall Anthropic.ClaudeCode, and for npm use npm uninstall -g @anthropic-ai/claude-code.
Frequently Asked Questions About Installing Claude Code
Is Claude Code free to install?
Installing it costs nothing, but using it requires a paid Claude plan or a Console account with billing set up.
Do I need Node.js to install Claude Code?
No. Only the npm method needs Node.js. The native installer, Homebrew and WinGet do not.
Can I use Claude Code without the terminal?
Yes. Anthropic offers a desktop app for macOS, Windows and Linux, plus extensions for VS Code and JetBrains editors.
Is Claude Code the same as the Claude chatbot?
No. The chatbot answers in a conversation window. Claude Code works inside your project, where it can read files, edit code and run commands with your approval. If you are still choosing a general assistant, see our comparison of the best AI assistants in 2026.