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.
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:
- Node.js 18 or higher installed (check with
node --version) - Terminal access (Command Prompt, PowerShell, or Bash)
- An Anthropic API key from console.anthropic.com
Install Claude Code on Windows
Critical: Windows requires WSL2. Native Windows installation is not supported.
Windows users: Once installed, always use Claude Code from your WSL2 Ubuntu terminal, not PowerShell.
Install Claude Code on macOS
macOS installation works but often needs PATH configuration:
Homebrew users: If the above fails, create a direct symlink:
Install Claude Code on Linux
Linux users should configure user-level npm to avoid permission issues:
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: Attempting to install Claude Code on Windows without WSL2
Fix: Install WSL2 first (see Windows section above). There are no workarounds.
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