Installing Claude Code on Windows has a small twist compared to Mac or Linux: you have two paths to choose from. You can run it natively in Windows, or you can run it inside WSL (Windows Subsystem for Linux). This guide covers both, tells you which one to pick, and walks you through every step.
This is part of our complete Claude Code Beginner’s Guide.
TL;DR
- Windows 10 (version 1809 or later) and Windows 11 are both supported
- You need a paid Anthropic account — Pro plan at $20/month minimum
- Two install paths: Native Windows (simpler) or WSL (better for Linux-based dev work)
- No Node.js required — the installer is self-contained
- Installation takes under two minutes either way
What You Need Before You Start
Compatible Windows version
Claude Code requires Windows 10 version 1809 or later, or Windows 11. To check your version, press Windows + R, type winver, and press Enter. A window will show your exact Windows version.
Most modern Windows computers are already compatible. If you’re on a very old machine that hasn’t been updated in years, run Windows Update first.
A paid Anthropic account
The free Claude.ai plan does not include Claude Code. You need at least a Pro plan ($20/month). If you haven’t signed up yet, go to claude.ai/upgrade first.
Native Windows or WSL — Which Should You Use?
Before installing, you need to make one decision.
Native Windows means Claude Code runs directly in your Windows terminal (PowerShell or Command Prompt). It’s simpler, requires nothing extra, and works great for Windows-native projects.
WSL (Windows Subsystem for Linux) is a feature built into Windows that runs a Linux environment inside Windows. Claude Code runs inside that Linux environment. It’s better if you’re working with Linux-based tools, Docker, or if you want sandboxing capabilities.
Which to pick:
- Just getting started? → Native Windows
- Working with Linux tools, Docker, or Node.js/Python projects? → WSL
- Not sure? → Native Windows — you can always add WSL later
This guide covers the Native Windows install first, then WSL.
Option A: Native Windows Install
Step 1: Open PowerShell or Command Prompt
Press Windows + S, type PowerShell, and click Windows PowerShell. You don’t need to run it as Administrator.
You’ll see a blue window with a PS C:\Users\YourName> prompt. That’s PowerShell.
Alternatively, if you see C:\Users\YourName> without the PS, you’re in Command Prompt — that works too, but you’ll use a slightly different install command.
Step 2: Run the Install Command
If you’re in PowerShell, paste this command and press Enter:
# Install Claude Code on Windows via PowerShell (recommended)
irm https://claude.ai/install.ps1 | iex
Here’s what this does:
irm— short forInvoke-RestMethod, a PowerShell command that downloads content from a URLhttps://claude.ai/install.ps1— Anthropic’s official Windows install script| iex— pipes the script intoInvoke-Expression, which runs it
If you’re in Command Prompt instead, use this command:
:: Install Claude Code on Windows via Command Prompt
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
⚠️ Warning: If you’re in PowerShell and you try the
&&Command Prompt version, you’ll get an error sayingThe token '&&' is not a valid statement separator. That’s your clue you’re in the wrong shell. Match the command to your shell type.
The installer runs for 30–60 seconds and downloads Claude Code to your machine.
Step 3: Close and Reopen Your Terminal
After the install finishes, close the terminal window completely and open a new one. This is required for the claude command to be recognized.
Step 4: Verify the Installation
In the new terminal window, run:
# Confirm Claude Code is installed and check the version
claude --version
You should see something like:
2.1.211 (Claude Code)
If you see a version number, the install worked.
Step 5: Install Git for Windows (Recommended)
Claude Code on native Windows can use Bash (a Unix shell) for running commands — but only if Git for Windows is installed. Without it, Claude Code falls back to PowerShell, which is more limited.
Download Git for Windows from git-scm.com/downloads/win and run the installer with default settings. After installing, Claude Code will automatically detect and use Git Bash.
This step is optional but recommended, especially if you’re doing any web development.
Step 6: Log In
Run Claude Code:
# Launch Claude Code and begin authentication
claude
It will open a browser window and take you to Anthropic’s login page. Sign in with your Pro or Max account. Once authorized in the browser, you’re logged in and ready to use Claude Code.
Option B: WSL Install
WSL (Windows Subsystem for Linux) lets you run a Linux environment on Windows. If you want to use Claude Code with Linux-based tools, this is the better setup.
Step 1: Install WSL
Open PowerShell as Administrator (right-click PowerShell and choose “Run as administrator”) and run:
# Install WSL 2 with the default Ubuntu distribution
wsl --install
This installs WSL 2 and Ubuntu. When it finishes, restart your computer.
After restarting, Ubuntu will open and ask you to create a username and password. Choose something simple — this is your Linux username, separate from your Windows account.
Step 2: Open Your WSL Terminal
Open the Ubuntu app from the Start menu (or search for it). You’ll see a Linux terminal prompt like:
yourname@DESKTOP-XXXXX:~$
That ~ means you’re in your Linux home directory. Everything from here happens inside this Linux environment.
Step 3: Run the Install Command
Inside the WSL terminal (not PowerShell), run:
# Install Claude Code inside WSL using the Linux native installer
curl -fsSL https://claude.ai/install.sh | bash
This is the same command as the Mac/Linux install. The installer runs and sets up Claude Code inside your WSL environment.
Step 4: Open a New WSL Window and Verify
Close the Ubuntu terminal and reopen it, then verify:
# Confirm Claude Code installed correctly inside WSL
claude --version
You should see a version number printed.
Step 5: Log In
# Launch Claude Code and authenticate
claude
A browser window will open for authentication. Sign in with your Anthropic account and you’re done.
💡 Pro Tip: Always launch
claudefrom inside the WSL terminal, not from PowerShell. Claude Code runs in the Linux environment, so it needs to be started there.
Common Problems and How to Fix Them
“irm is not recognized” in Command Prompt
You’re in Command Prompt, not PowerShell. Use the curl version of the install command instead, or switch to PowerShell by typing powershell and pressing Enter, then run the irm command.
PowerShell says “running scripts is disabled on this system”
Windows has a security policy called Execution Policy that blocks PowerShell scripts by default. To fix it, run this first:
# Allow PowerShell to run scripts for the current user
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Press Enter, type Y to confirm, then run the install command again.
“command not found: claude” or “‘claude’ is not recognized”
Close the terminal and open a new one. The PATH update only takes effect in fresh sessions. If the problem persists after a new terminal, run claude doctor to diagnose.
WSL install fails with “curl: not found”
Some minimal WSL distributions don’t include curl by default. Install it first:
# Install curl inside WSL
sudo apt update && sudo apt install curl -y
Then run the Claude Code install command.
The browser login page doesn’t open automatically
Look in the terminal for a URL printed during the login flow. Copy it and paste it manually into your browser to complete authentication.
Claude Code opens but won’t connect to the internet
Corporate networks or VPNs sometimes block Claude Code’s API calls. Try disabling your VPN temporarily, or ask your IT team about allowing traffic to api.anthropic.com.
Key Takeaways
- Claude Code works on Windows 10 (1809+) and Windows 11
- Native Windows is the simpler path; WSL** is better for Linux-based development
- The PowerShell install command is:
irm https://claude.ai/install.ps1 | iex - Always open a new terminal window after installing before testing
- Install Git for Windows on native installs to unlock the Bash tool
Next Steps
- Use it for the first time**: Your First 10 Minutes with Claude Code
- Understand what it costs**: Claude Code Pricing — Free vs Pro vs API Explained
- Compare OS installs**: How to Install Claude Code on Mac or How to Install Claude Code on Linux
Return to the Claude Code Beginner’s Guide for the full learning path.