How to Install Claude Code: Step-by-Step Guide for Every Platform (2026)
Install Claude Code on macOS, Windows, or Linux in under 2 minutes. Native installer, Homebrew, npm, and WSL methods covered with screenshots and troubleshooting.
Prerequisites
Before installing Claude Code, you need:
- A Claude account with a Pro ($20/month), Team, or Enterprise subscription
- Node.js 18+ installed on your system (check with
node --version) - Operating system: macOS 13+, Linux (most distributions), or Windows 10/11
Method 1: Native Installer (Recommended)
The native installer is the simplest method and requires no additional dependencies. It auto-updates, so you always have the latest version.
macOS
Open Terminal and run:
``bash
curl -fsSL https://claude.ai/install.sh | sh
`
This downloads and installs Claude Code to your system path. Once complete, type claude to launch.
Linux
Same command works on most Linux distributions:
`bash
curl -fsSL https://claude.ai/install.sh | sh
`
Supported on Ubuntu, Debian, Fedora, Arch, and most distributions with a standard shell.
Windows
For Windows, use the native Windows installer or WinGet:
`powershell
winget install Anthropic.ClaudeCode
`
Or download the installer directly from claude.ai.
Method 2: Homebrew (macOS/Linux)
If you use Homebrew:
`bash
brew install claude-code
`
Method 3: npm (All Platforms)
If you prefer npm:
`bash
npm install -g @anthropic-ai/claude-code
`
Note: The native installer is recommended over npm as it includes automatic updates and doesn't require Node.js to be pre-installed.
First Launch
After installation:
Typeclaudein your terminal- On first launch, you'll choose a text display style
- You'll be prompted to authenticate -- sign in with your Claude account
- Claude Code will confirm your subscription and you're ready to go
Essential First Steps
Once Claude Code is running, do these immediately:
Initialize your project
Navigate to your project directory and run:
`
/init
`
This creates a CLAUDE.md file -- the instruction manual that tells Claude Code about your project. This single step dramatically improves output quality.
Set up your preferences
Configure your coding preferences, commit message style, and permission settings through the /settings command or by editing your CLAUDE.md file.
Troubleshooting
"command not found: claude"
Your PATH may not include the installation directory. For the native installer, try restarting your terminal. For npm installs, ensure your global npm bin directory is in your PATH:
`bash
npm config get prefix
Add the /bin subdirectory of the output to your PATH
`Authentication errors
Make sure you have an active Claude Pro, Team, or Enterprise subscription. Free tier does not include Claude Code access.
Node.js version too old
Claude Code requires Node.js 18 or later. Update with:
`bash
macOS/Linux with nvm
nvm install 18
nvm use 18Or download from nodejs.org
`Permission errors on macOS
If you see permission errors, you may need to allow the installer in System Settings > Privacy & Security.
Updating Claude Code
The native installer auto-updates. For other methods:
`bash
Homebrew
brew upgrade claude-codenpm
npm update -g @anthropic-ai/claude-code
``What's next
Once installed, read our guide on setting up your CLAUDE.md file -- the single most impactful thing you can do to get better results from Claude Code.
Frequently asked questions
How do I install Claude Code on Mac?
Open Terminal and run: curl -fsSL https://claude.ai/install.sh | sh. This installs Claude Code using the native installer, which auto-updates and requires no dependencies. Once installed, type 'claude' in your terminal to launch it. You'll need macOS 13 (Ventura) or later.
How do I install Claude Code on Windows?
On Windows, use WinGet: winget install Anthropic.ClaudeCode. Alternatively, download the native installer from claude.ai. Claude Code also works through WSL (Windows Subsystem for Linux) if you prefer a Linux-like terminal environment.
Do I need to know how to code to install Claude Code?
You need basic familiarity with opening a terminal and running a single command. The installation itself is one command. After that, you interact with Claude Code in plain English -- no coding knowledge required to use it.
Is Claude Code free?
Claude Code requires a paid Claude subscription. The Pro plan is $20/month and includes Claude Code access. There is no free tier for Claude Code, but the Pro plan includes generous usage limits for most individual workflows.
How do I update Claude Code?
If you used the native installer, Claude Code updates automatically. For Homebrew installations, run 'brew upgrade claude-code'. For npm installations, run 'npm update -g @anthropic-ai/claude-code'.
Related guides
Need help implementing this?
//prometheus does onsite AI consulting and implementation in Milwaukee. We set it up, train your team, and make sure it works.
let's talk