Claude Code went from zero to 1 million monthly searches in under a year. If you got here because “everyone is talking about it” and you want to try it yourself, this is your 5-minute setup guide.
Three things to know before we start:
- You need a Claude Pro subscription ($20/mo) or higher. The free tier doesn’t include Claude Code.
- Claude Code lives in your terminal — the text-based command window on your computer.
- The native installer replaced npm as the official method in early 2026. Tutorials older than a few months probably show you the npm way. That still works but is now deprecated.
Let’s go.
System Requirements
Before installing, check you’re on a supported OS:
| OS | Minimum Version | Notes |
|---|---|---|
| macOS | 13.0 (Ventura) | Apple Silicon or Intel |
| Linux | Ubuntu 20.04+ / Debian 10+ / Alpine 3.19+ | 4 GB+ RAM recommended |
| Windows | 10 (1809+) or Server 2019+ | WSL 2 or Git for Windows |
If you’re on Windows 11, you’re fine. If you’re on macOS Monterey (12) or older, upgrade first.
Option 1: macOS or Linux (The 30-Second Install)
Open Terminal. Paste this. Hit Enter.
curl -fsSL https://claude.ai/install.sh | bash
That’s the entire install. The native installer downloads the binary, puts it in ~/.local/bin, and sets up auto-updates. No Node.js needed, no dependencies, no package manager drama.
Verify it worked:
claude --version
claude doctor
claude doctor runs diagnostics — auth status, PATH, config, MCP servers. Always run it after install to catch any issues early.
Now jump into a project:
cd /path/to/your/project
claude
That’s it. You’re in Claude Code.
Option 2: Windows with WSL (Recommended)
WSL (Windows Subsystem for Linux) lets you run Linux inside Windows. Claude Code works better through WSL than the native Windows path, and the install is the same as Linux.
Step 1: Open PowerShell as Administrator and run:
wsl --install
Reboot when prompted. After restart, open the Ubuntu terminal from your Start menu.
Step 2: Inside the Ubuntu/WSL terminal, install Claude Code:
curl -fsSL https://claude.ai/install.sh | bash
Step 3: Verify and start:
claude --version
claude doctor
cd /mnt/c/Users/YOUR_USERNAME/path/to/project
claude
The /mnt/c/ path is how WSL accesses your Windows drives. Your C: drive is at /mnt/c/, D: at /mnt/d/, and so on.
Option 3: Windows Native (PowerShell)
If you want to avoid WSL, you can install directly on Windows. This route requires Git for Windows since Claude Code uses Git Bash internally.
Step 1: Install Git for Windows first. Accept the defaults.
Step 2: Open PowerShell (not Administrator) and run:
irm https://claude.ai/install.ps1 | iex
Step 3: Verify:
claude --version
claude doctor
If claude doctor complains about not finding Git Bash, add this to ~/.claude/settings.json:
{
"env": {
"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
}
}
Option 4: The Legacy NPM Method (Still Works)
If you already have Node.js 18+ installed and prefer npm:
npm install -g @anthropic-ai/claude-code
Anthropic deprecated this path but kept it working for backward compatibility. Three reasons to avoid it:
- No auto-updates. You manually
npm updatewhen new versions ship. - Requires Node.js 18+. The native installer has zero dependencies.
- Breaks more often. npm global installs hit permission issues frequently.
If you already installed via npm, migrate to native:
# Install native binary
curl -fsSL https://claude.ai/install.sh | bash
# Remove old npm version
npm uninstall -g @anthropic-ai/claude-code
Authentication (The Login Dance)
First time you run claude, it opens your browser for OAuth login. Sign in with whichever Anthropic account you use:
- Claude Pro/Max personal subscription — claude.ai login
- Claude Team or Enterprise — your workspace login
- Claude Console — if your org invited you
If your browser doesn’t open automatically, press c in the terminal to copy the login URL, paste it into your browser, finish login, then paste the code back into the terminal when prompted.
To switch accounts later:
/logout
(Run this inside Claude Code, not your shell.)
Your First Commands
After claude drops you into an interactive session, try these:
/help # Show all available commands
/status # Check auth, subscription, rate limits
/config # View current configuration
/logout # Sign out
From your shell (outside the interactive session):
claude doctor # Diagnostic report
claude --version # Show installed version
claude mcp list # List configured MCP servers
A Real First Task
Open a project you already have. Could be anything — a Next.js app, a Python script, a config repo. Start Claude Code:
cd /path/to/project
claude
Then type a real task in plain English. Something like:
“Read the README, then tell me how this project is organized.”
Or:
“Add a new function that validates email addresses. Put it wherever it fits best in the codebase.”
Or:
“Find all the TODO comments and list them with file paths.”
Claude will look at your files, think, and propose changes. It asks you to approve each file edit before making it. You stay in control.
Common Setup Problems (And Fixes)
“command not found: claude”
The installer put the binary in ~/.local/bin, but your shell doesn’t know about that directory. Add it to your PATH:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Replace .bashrc with .zshrc if you’re on zsh (macOS default since Catalina).
“The token ‘&&’ is not a valid statement separator”
You pasted a CMD-style command into PowerShell. Either switch to CMD, or use the PowerShell version:
irm https://claude.ai/install.ps1 | iex
“Permission denied” during npm install
You tried sudo npm install -g and it broke permissions. Don’t use sudo with npm. Instead, either:
- Use the native installer (no sudo needed):
curl -fsSL https://claude.ai/install.sh | bash - Use nvm (Node Version Manager) to install Node in your home directory
WSL can’t reach the internet
Test with curl https://claude.ai. If that fails, your Windows firewall or VPN is blocking WSL. Most VPNs have a “exclude local traffic” option — enable it.
Node.js version too old (npm only)
Claude Code npm install requires Node 18 or newer. Check with node -v. If you see v16 or older, upgrade via nvm:
nvm install 20
nvm use 20
Or skip npm entirely and use the native installer.
Rate limited immediately after install
You’re on the Pro plan and hitting limits in under an hour? This is a real issue Anthropic acknowledged on March 31, 2026. Check your Claude Code version:
claude --version
If you’re on v2.1.100 or newer, there’s a reported bug that inflates token usage 10-20x. The fix per community reports: downgrade to v2.1.34 until the official patch lands.
Extending Claude Code With MCP
Once you’ve got the basics working, the real power is connecting Claude Code to other tools via MCP (Model Context Protocol). MCP turns Claude Code from “coding assistant” into “coding assistant with direct access to your databases, APIs, and team tools.”
List current MCP servers:
claude mcp list
Add a new one (example — connecting a database):
claude mcp add my-db --command "docker run --rm my-db-mcp:latest"
Each project can have its own .claude/.mcp.json file listing the MCP servers that project uses. Shared codebases can commit this file so everyone on the team gets the same tool setup.
Popular MCP servers to try:
- GitHub MCP — Claude Code can open PRs, review branches, search issues
- Database MCPs — query PostgreSQL, MySQL, or MongoDB directly
- Shopify MCP — see our Shopify AI Toolkit guide
- Slack/Notion/Linear — pull context from your team tools
Quick OS Cheat Sheet
| Environment | Install Command |
|---|---|
| macOS 13+ | curl -fsSL https://claude.ai/install.sh | bash |
| Linux (Ubuntu/Debian) | curl -fsSL https://claude.ai/install.sh | bash |
| Windows WSL | Same as Linux (inside WSL) |
| Windows PowerShell | irm https://claude.ai/install.ps1 | iex |
| Windows CMD | curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd |
| Legacy npm | npm install -g @anthropic-ai/claude-code (Node 18+) |
What This Means for You
If you’ve never used a terminal before: Stick with macOS or WSL on Windows. The terminal is part of Claude Code’s identity — you can’t really use it without at least basic terminal comfort. Spend 30 minutes learning cd, ls, pwd, and git basics if you haven’t already.
If you’re a developer evaluating Claude Code: Install it in 5 minutes, point it at a side project, give it a real task. Cursor is more IDE-like, Copilot is more autocomplete-like — Claude Code is genuinely different, and you have to feel it to understand it.
If you’re setting this up for your team: Create a .claude/ directory in your shared repos with team-wide MCP configuration. Commit it. New team members run the installer, authenticate, and inherit your team’s tool setup automatically.
If you already installed Claude Code: The plugin and MCP ecosystem is where you level up from “Claude Code user” to “Claude Code power user.” Our Claude Code Mastery course goes deep on skills, hooks, and MCP.
The Bottom Line
Installing Claude Code takes 30 seconds to 5 minutes depending on your OS. The native installer (April 2026 default) is reliable, fast, and dependency-free.
The real learning curve isn’t installation — it’s figuring out how to use Claude Code productively once it’s installed. Start with small tasks, grow into larger workflows, add MCP tools as you find real needs. Don’t try to configure everything on day one.
And budget for the subscription. Free tier won’t get you there. Pro at $20/month is the real entry point.
Next step: Our Claude Code Mastery course covers the entire workflow — from first install to advanced agentic patterns with skills, hooks, and MCP. If you’re already installed, you might also want our Claude Code Pricing Guide to pick the right subscription tier.
Sources:
- Claude Code Setup — Official Docs
- Install Claude Code — Anthropic
- Install Claude Code Complete Setup Guide — NxCode
- How to Install Claude Code: Windows, Mac & Linux — ClaudeFast
- How to Install Claude Code 2026: Every Platform — MorphLLM
- Install Claude Code — Claudelog
- Claude Code Installation Complete Guide — Skills Playground
- How to Install Claude Code for Beginners — phpFashion
- Claude Code GitHub Repository
- How to Install via npm, brew — eesel AI