OneProvider
CLAUDE CODE · INSTALL

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

  1. macOS, Linux and WSL

    Run the installer in a terminal.

    curl -fsSL https://claude.ai/install.sh | bash
  2. Windows PowerShell

    Run it from PowerShell. You do not need Administrator rights.

    irm https://claude.ai/install.ps1 | iex
  3. Or 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.ClaudeCode
  4. Check 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

Pick by where your projects live
OptionRequiresSandboxingUse it when
Native WindowsNothing extra, Git for Windows is optionalNot supportedYour projects and tools are Windows-native
WSL 2WSL 2 enabledSupportedYou use Linux toolchains or want sandboxed commands
WSL 1WSL 1 enabledNot supportedWSL 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
claude

Claude 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.

Common problems
SymptomWhat to try
command not found after installOpen a new terminal, then run claude --version again.
Install fails on AlpineInstall bash and curl with apk add bash curl, then repeat the installer.
Something behaves oddlyRun claude doctor and read the warnings it prints.
A login screen appears when you meant to use a keySet 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.