Claude Code Installation: Windows, Mac & Linux Setup
Install Claude Code in under 2 minutes. Native installers for Windows (irm), macOS (curl), and Linux. No Node.js required.
Agentic Orchestration Kit for Claude Code.
Problem: You want to install Claude Code but don't know where to start. Here's the fastest path from zero to working AI terminal. See our complete guide for an overview of all Claude Code capabilities.
How to Install Claude Code: Quick Start
Anthropic now offers native installers as the recommended method. No Node.js required:
Windows PowerShell (Recommended):
irm https://claude.ai/install.ps1 | iexmacOS / Linux:
curl -fsSL https://claude.ai/install.sh | bashHomebrew (macOS/Linux):
brew install --cask claude-codeRun claude --version to verify. Success looks like: A version number displays without errors.
For details on what the native installer does and troubleshooting, see our Native Installer Guide.
If that worked, skip to Configure Your API Key. If not, follow your platform-specific steps below.
Step-by-Step: Install Claude Code on Any Platform
Before you install Claude Code, verify you have:
- Terminal access (Command Prompt, PowerShell, or Bash)
- An Anthropic API key from platform.claude.com
- Node.js 18+ (only required for npm installation method)
Install Claude Code on Windows
Windows now supports multiple installation options. Choose the one that fits your workflow:
Option 1: Native Windows (Recommended)
# PowerShell (Run as Administrator)
irm https://claude.ai/install.ps1 | iex
claude --versionOption 2: Git Bash
Install Git for Windows, then:
curl -fsSL https://claude.ai/install.sh | bash
claude --versionOption 3: WSL (Ubuntu)
# Install WSL if needed (PowerShell as Administrator)
wsl --install -d Ubuntu
# Inside Ubuntu terminal
curl -fsSL https://claude.ai/install.sh | bash
claude --versionWindows users: The native installer no longer requires Node.js. WSL users should run Claude Code from their Linux terminal.
Install Claude Code on macOS
Option 1: Homebrew (Recommended)
brew install --cask claude-code
claude --versionOption 2: Native Installer
curl -fsSL https://claude.ai/install.sh | bash
claude --versionOption 3: npm (if you prefer Node.js)
npm install -g @anthropic-ai/claude-code
# If you see "command not found", fix PATH:
echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
claude --versionInstall Claude Code on Linux
Option 1: Native Installer (Recommended)
curl -fsSL https://claude.ai/install.sh | bash
claude --versionOption 2: Homebrew
brew install --cask claude-code
claude --versionOption 3: npm (requires Node.js 18+)
# Create user npm directory (prevents sudo requirements)
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
# Install Claude Code
npm install -g @anthropic-ai/claude-code
claude --versionConfigure Your API Key
After you install Claude Code successfully, configure authentication:
claude
# Paste your API key when promptedGet your API key: Visit platform.claude.com, create an account, navigate to API Keys, and generate a new key starting with sk-.
Verify Your Installation
Test your Claude Code installation:
claude --version # Shows version number
claude doctor # Runs diagnosticsQuick functionality test:
mkdir test-project && cd test-project
echo "console.log('Hello!');" > test.js
claudeIn the Claude prompt: "Read test.js and explain it"
Success: Claude reads the file and explains the JavaScript code.
Common Errors When You Install Claude Code
Error: "Command Not Found"
Cause: PATH configuration missing after install
Fix:
which claude # Check if installed
npm list -g @anthropic-ai/claude-code
# Add to PATH manually
echo 'export PATH="$PATH:/usr/local/lib/node_modules/@anthropic-ai/claude-code/bin"' >> ~/.bashrc
source ~/.bashrcError: "EBADPLATFORM"
Cause: npm installation attempted on unsupported platform configuration
Fix: Use the native installer instead of npm:
# Windows PowerShell
irm https://claude.ai/install.ps1 | iexError: "EACCES Permission Denied"
Cause: npm requires sudo (insecure practice)
Fix: Configure user-level npm directory (see Linux section above). This works on all platforms.
Nuclear Reset (Fixes 95% of Issues)
When everything fails, reset completely:
npm uninstall -g @anthropic-ai/claude-code
rm -rf ~/.claude ~/.npm/_cacache
npm cache clean --force
npm install -g @anthropic-ai/claude-code
claude --versionWhat to Do After You Install Claude Code
Once claude --version works without errors:
- Build your first project: First Project Guide
- Learn the interface: What is Claude Code
- Configure settings: Configuration Basics
- Fix common problems: Troubleshooting Guide
- See real examples: Examples & Templates
The base installation gives you Claude Code's core capabilities. From there, you can build your own agent setup from scratch, or start with a pre-configured foundation like ClaudeFast's Complete Kit, which ships with 18 specialized agents, hooks, and skills already wired together -- so you skip the configuration phase and go straight to building.
Pro tip: Run claude doctor anytime something feels broken. It auto-detects most configuration issues and suggests fixes.
Last updated on
