Want an AI that works for you 24/7? Get the Free Blueprint href="/blueprint">Meet your Chief AI Officer →rarr;
Tutorial

How to Install Claude Code: Complete Setup Guide

Get Claude Code running on your computer in under 10 minutes. Works on Mac, Windows (WSL), and Linux.

Updated February 10, 2026 · 8 min read

To install Claude Code, run Anthropic's native installer from your terminal -- one command on Mac, Linux, or Windows -- and you'll be up and running in under five minutes with no Node.js required. You just need a Claude subscription (Pro, Max, Team, or Enterprise) or an Anthropic API key.

Jump to your section: Native Installer (Recommended) · Mac · Windows · Linux · Legacy npm Install

New to Claude Code? Watch the free CAIO Blueprint to see it in action.

Prerequisites

Before installing Claude Code, you need:

  1. A computer running macOS, Linux, or Windows (Windows now works natively — WSL is optional)
  2. A Claude subscription (Pro, Max, Team, or Enterprise) or Anthropic API key

That's it. The native installer handles everything else — no Node.js required.

Native Installer (Recommended)

As of late 2025, Anthropic's native installer is the recommended way to install Claude Code on all platforms. It's simpler, more stable, and doesn't require Node.js or npm.

macOS and Linux

Open Terminal and run:

curl -fsSL https://claude.ai/install.sh | bash

Or install via Homebrew:

brew install --cask claude-code

Note: Homebrew installations do not auto-update. Run brew upgrade claude-code periodically to stay current.

Windows

Open PowerShell as Administrator and run:

irm https://claude.ai/install.ps1 | iex

This installs Claude Code natively on Windows — no WSL required. You will need Git for Windows installed (which includes Git Bash).

After installation, verify it worked:

claude --version

The native installer handles updates automatically in the background, so you'll always have the latest version.

That's the fastest path. If the native installer worked, skip ahead to Authenticate Claude Code. The sections below cover platform-specific alternatives.

Install Claude Code on Mac (Alternative: npm)

If you prefer the npm method or the native installer didn't work, you can still install via Node.js. You'll need to install Node.js first, then Claude Code itself.

Step 1: Install Node.js on Mac

The easiest way is using Homebrew. Open Terminal (Applications → Utilities → Terminal) and run:

brew install node

Don't have Homebrew? Install it first:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Alternatively, download Node.js directly from nodejs.org.

Step 2: Install Claude Code on Mac

npm install -g @anthropic-ai/claude-code

If you get a permission error, run:

sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

Then try the install command again.

Install Claude Code on Windows (Alternative Methods)

The native installer (covered above) now lets you run Claude Code directly in PowerShell — no WSL needed. But if you prefer WSL for a full Linux environment, or if you need WSL for other development work, here's the WSL approach:

Step 1: Install WSL

Open PowerShell as Administrator (right-click → Run as Administrator) and run:

wsl --install

This installs WSL with Ubuntu. Restart your computer when prompted.

After restarting, Ubuntu will finish setting up. Create a username and password when asked.

Step 2: Install Node.js in WSL

Open Ubuntu from the Start menu (not PowerShell or CMD). Run:

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs

Step 3: Install Claude Code in WSL

npm install -g @anthropic-ai/claude-code

Important: Always run Claude Code from inside WSL (Ubuntu), not from PowerShell or CMD.

Install Claude Code on Linux (Alternative: npm)

If you prefer npm over the native installer, here are instructions for common distributions.

Ubuntu/Debian

Install Node.js:

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs

Install Claude Code:

npm install -g @anthropic-ai/claude-code

Fedora/RHEL

Install Node.js:

curl -fsSL https://rpm.nodesource.com/setup_20.x | sudo bash -
sudo dnf install -y nodejs

Install Claude Code:

npm install -g @anthropic-ai/claude-code

Verify Installation

On any platform, verify your installation by running:

node --version

You should see v18.x.x or higher.

Authenticate Claude Code

Claude Code needs to connect to your Claude account. You have two options:

Option A: Claude Subscription (Recommended)

If you have a Claude subscription (Pro at $20/month, Max at $100-200/month, or Team/Enterprise), you can use Claude Code directly. Launch Claude Code:

claude

On first run, it will open your browser for a one-time OAuth process. Log in with your Claude account and authorize the connection. This is the simplest path.

Option B: API Key

If you're using the Anthropic API, set your API key as an environment variable:

export ANTHROPIC_API_KEY="your-api-key-here"

To make this permanent, add the line to your shell config file (~/.zshrc on Mac, ~/.bashrc on Linux/WSL).

Run Your First Command

Let's verify everything works. Open your terminal and run:

claude

You should see Claude Code's interactive prompt. Try a simple task:

You: What files are in my current directory?

Claude Code will list the files in your current folder, confirming it can read your filesystem.

You're ready! Claude Code is installed and working. You can now start describing tasks and watching it work.

Want to see what's possible? Get the CAIO Blueprint using only plain English — no code, no templates, just describing what I want.

IDE Integration (Optional)

Claude Code also integrates directly with popular IDEs. If you prefer working inside an editor rather than a standalone terminal:

Both IDE integrations use the same Claude Code installation underneath, so set up the CLI first, then add the IDE extension if you want it.

Quick Tips for Getting Started

Start Simple

Your first few tasks should be low-stakes. Try things like:

Be Specific

Claude Code works best with clear, specific instructions. Instead of "organize my files," try "move all .jpg files from Downloads to a new folder called Photos, organized by year based on the file's creation date."

Approve Carefully

Claude Code asks for permission before running terminal commands or writing files. Read what it's about to do before approving, especially when you're learning.

Use /help

Type /help in the Claude Code prompt to see available commands and options.

Troubleshooting

"command not found: claude"

The npm global bin directory isn't in your PATH. Try:

export PATH="$PATH:$(npm config get prefix)/bin"

Add this line to your shell config file to make it permanent.

"Unauthorized" or authentication errors

Your API key may be invalid or expired. Double-check it at console.anthropic.com.

WSL-specific issues

If you installed via WSL, make sure you're running Claude Code inside WSL, not in PowerShell or CMD. Open Ubuntu (or your WSL distro) from the Start menu. Alternatively, use the native Windows installer to avoid WSL entirely.

What's Next?

Now that Claude Code is installed, you're ready to start building. Check out:

Like Claude Code? Meet Your Chief AI Officer

Watch a 10-minute video where I build a website using only plain English. Then try it yourself.

Get the Free Blueprint href="/blueprint">Watch the Free Setup Video →rarr;