<Pablo />
Back to the Claude Code guide

How to install Claude Code on Windows, Mac, and Linux

Step-by-step to install and download Claude Code on Windows, Mac, and Linux: native installer, Homebrew, WinGet, and npm, with requirements and verification.

Updated on May 30, 2026

Installing Claude Code takes less than a minute. The recommended method is the native installer, which auto-updates in the background. Below are all the ways to install — pick the one for your system.

How to install on Mac

On macOS (13 or later), open Terminal and run the native installer:

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

If you use Homebrew, you can also install with:

brew install --cask claude-code

How to install on Linux

On Linux (Ubuntu 20.04+, Debian 10+, and others), use the same native installer:

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

There are also official repositories for apt, dnf, and apk (Debian/Ubuntu, Fedora/RHEL, and Alpine), handy on servers and managed environments.

How to install on Windows

In PowerShell:

irm https://claude.ai/install.ps1 | iex

Or using WinGet:

winget install Anthropic.ClaudeCode

Installing Git for Windows is optional but recommended so Claude Code can use Bash. You can also run everything inside WSL (Windows Subsystem for Linux) with the Linux installer.

How to install via npm

If you already have Node.js 18 or later, you can install it as a global package:

npm install -g @anthropic-ai/claude-code

Avoid using sudo npm install -g, which can cause permission issues.

System requirements

How to get started

After installing, go into your project folder and run claude:

cd your-project
claude

The first time, it prompts you to log in via the browser. Remember: you need a Pro, Max, Team, or Enterprise subscription, or an Anthropic Console account.

How to verify the installation

To confirm it worked:

claude --version

If something fails, run claude doctor for a detailed diagnostic. Native installations auto-update; via Homebrew, WinGet, or npm, updates are manual.

Want to use AI to speed up development?

I help developers and teams implement Claude Code, Cursor, Codex, and automation safely in their real workflow.

Frequently asked questions about Claude Code

How do I download Claude Code?

On Mac and Linux, run curl -fsSL https://claude.ai/install.sh | bash. On Windows, use irm https://claude.ai/install.ps1 | iex in PowerShell. You can also install via Homebrew, WinGet, or npm.

Do I need Node.js to install Claude Code?

Not necessarily. The native installer (curl/irm) does not require Node.js. You only need Node.js 18+ if you choose to install via npm.

Does Claude Code work on Windows?

Yes. You can install natively on Windows 10+ via PowerShell or WinGet, or run it inside WSL. Installing Git for Windows is optional but recommended.

How do I update Claude Code?

Native installations auto-update in the background. If you installed via Homebrew, WinGet, or npm, update manually (for example, npm install -g @anthropic-ai/claude-code@latest).

Free download: Guide to Turn Your Idea into Software

I don't send spam. I use your data only to send the e-book and, when relevant, reply about your project.

Download E-book