How to Install Claude Code on Windows with WSL
Set up Windows Subsystem for Linux, install Claude Code inside it, and run the CLI from a real Linux shell on Windows.
Claude Code runs best on a Unix-like shell, so on Windows the recommended path is the Windows Subsystem for Linux (WSL). This gives you a real Ubuntu environment where the CLI, git, and your build tools all behave the way the agent expects. This guide installs WSL, then Claude Code inside it.
What you need
- Windows 10 version 2004+ or Windows 11
- Administrator rights to enable WSL
- An Anthropic account or API key
- About 15 minutes including a reboot
Step 1: Install WSL
Open PowerShell as Administrator and run the single install command. It enables the feature, installs Ubuntu, and sets WSL 2 as the default. Reboot when prompted.
wsl --installStep 2: Create your Linux user
After the reboot, launch Ubuntu from the Start menu. The first run asks you to pick a username and password for the Linux account. This is separate from your Windows login.
Step 3: Install Node inside WSL
Inside the Ubuntu shell, install Node with nvm so you control the version without touching system packages.
Step 4: Install and launch Claude Code
With Node in place, install the CLI globally and start it. The first launch opens your default browser for sign-in.
npm install -g @anthropic-ai/claude-code
claude --version
claudeResult: you have a genuine Linux toolchain on Windows with Claude Code installed. From here, every other guide in this series works the same as it does on macOS or Linux.
Watch related tutorials
6:41
14:00
12:00
09:00
10:00
9:47