Claude Code Installation: The Real Guide | Complete Setup Tutorial
Complete Claude Code installation guide with platform-specific solutions, troubleshooting, and community-tested fixes for Windows, macOS, and Linux.
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
Install Claude Code in under 2 minutes with this command:
Success looks like: A version number displays without errors.
If that worked, skip to Troubleshooting. 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 console.anthropic.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)
Option 2: Git Bash
Install Git for Windows, then:
Option 3: WSL (Ubuntu)
Windows 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)
Option 2: Native Installer
Option 3: npm (if you prefer Node.js)
Install Claude Code on Linux
Option 1: Native Installer (Recommended)
Option 2: Homebrew
Option 3: npm (requires Node.js 18+)
Configure Your API Key
After you install Claude Code successfully, configure authentication:
Get your API key: Visit console.anthropic.com, create an account, navigate to API Keys, and generate a new key starting with sk-.
Verify Your Installation
Test your Claude Code installation:
Quick functionality test:
In 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:
Error: "EBADPLATFORM"
Cause: npm installation attempted on unsupported platform configuration
Fix: Use the native installer instead of npm:
Error: "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:
What 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
Pro tip: Run claude doctor anytime something feels broken. It auto-detects most configuration issues and suggests fixes.
Last updated on