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.
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 | bashIf you use Homebrew, you can also install with:
brew install --cask claude-codeHow 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 | bashThere 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 | iexOr using WinGet:
winget install Anthropic.ClaudeCodeInstalling 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-codeAvoid using sudo npm install -g, which can cause permission issues.
System requirements
- OS: macOS 10.15+, Windows 10+, or Ubuntu 20.04+/Debian 10+
- Hardware: 4 GB of RAM, x64 or ARM64 processor
- Network: internet connection
- Shell: Bash, Zsh, PowerShell, or CMD
How to get started
After installing, go into your project folder and run claude:
cd your-project
claudeThe 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 --versionIf 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.