How to install Claude Code on Windows, macOS and Linux
Claude Code installs with one command and takes about two minutes. This guide covers the requirements, the installer for each system, the choice between native Windows and WSL, how to log in or use an API key, and how to update.
Requirements
- macOS 13.0 or later, Windows 10 version 1809 or later, Ubuntu 20.04 or later, Debian 10 or later, or Alpine Linux 3.19 or later.
- 4 GB of RAM or more and an x64 or ARM64 processor.
- An internet connection and a shell: Bash, Zsh, PowerShell or CMD.
- A country on Anthropic's supported list. Git is optional.
Anthropic's system requirements list no Node.js. The native installer below does not need it.
Install it
macOS, Linux and WSL
Run the installer in a terminal.
curl -fsSL https://claude.ai/install.sh | bashWindows PowerShell
Run it from PowerShell. You do not need Administrator rights.
irm https://claude.ai/install.ps1 | iexOr use a package manager
Homebrew on macOS, WinGet on Windows. Package-manager installs do not update themselves.
brew install --cask claude-code winget install Anthropic.ClaudeCodeCheck the install
A version number means it works. claude doctor prints a read-only health report if something looks wrong.
claude --version claude doctor
Windows: native or WSL
| Option | Requires | Sandboxing | Use it when |
|---|---|---|---|
| Native Windows | Nothing extra, Git for Windows is optional | Not supported | Your projects and tools are Windows-native |
| WSL 2 | WSL 2 enabled | Supported | You use Linux toolchains or want sandboxed commands |
| WSL 1 | WSL 1 enabled | Not supported | WSL 2 is not available |
For WSL, open your Linux distribution and run the Linux installer inside it, not from PowerShell. With Git for Windows installed, Claude Code uses Git Bash for its Bash tool.
Log in or use an API key
Start it in your project folder.
cd your-project
claudeClaude Code needs a Pro, Max, Ultra, Team or Enterprise plan, or a Console account. The free claude.ai plan does not include it. Instead of logging in you can set ANTHROPIC_API_KEY and approve the key when asked, or use a gateway key with ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN. The guide linked below has the exact values.
Update and fix
Native installs update themselves in the background. To update by hand, run claude update. Homebrew and WinGet need brew upgrade claude-code or winget upgrade Anthropic.ClaudeCode.
| Symptom | What to try |
|---|---|
| command not found after install | Open a new terminal, then run claude --version again. |
| Install fails on Alpine | Install bash and curl with apk add bash curl, then repeat the installer. |
| Something behaves oddly | Run claude doctor and read the warnings it prints. |
| A login screen appears when you meant to use a key | Set the key variables in this session or in settings.json and start a new session. |
Frequently asked questions
How do I install Claude Code?
Run curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux or WSL, or irm https://claude.ai/install.ps1 | iex in Windows PowerShell. Then run claude in your project folder.
Does Claude Code work on Windows without WSL?
Yes. It runs natively on Windows 10 version 1809 or later. WSL 2 is the choice when you want sandboxed command execution or Linux toolchains.
Do I need Node.js to install Claude Code?
No. The native installer does not use it, and Anthropic's system requirements do not list it.
Is Claude Code free to install?
The installer costs nothing, but using Claude Code needs a paid Claude plan or an API key with credit.
How do I update Claude Code?
Native installs update in the background. Run claude update to apply an update now.
Can I use Claude Code without a subscription?
Yes. Use an API key from the Claude Console, or a gateway key. Requests are then billed per token.
Claude, ChatGPT, GPT, Cursor and other product names are trademarks of their owners and are used only to describe compatibility. We do not give legal advice: following local rules stays with the user.