The AI Stack
Sign in
← Notes
·3 min read

Setting up Claude Code on Windows, the WSL way

Anyone who has watched a developer use Claude Code has had roughly the same reaction. The model writes the file, runs the test, reads the error, fixes the bug, commits the change. The human types in plain English. Until late 2025, almost none of that worked cleanly on Windows. You either installed a hidden Linux computer first (Windows Subsystem for Linux, usually shortened to WSL) or you waited. In October 2025, Anthropic shipped a native Windows installer that drops the Linux requirement entirely, and the install collapsed from a roughly 30-step ordeal to a single PowerShell command. For most newcomers, though — especially anyone whose projects touch Docker, bash tooling, or anything that wants a real Unix filesystem — WSL is still the better path. This is that walkthrough.

Part One

First, the account.

Before you touch the Windows machine, get an Anthropic account squared away. Claude Code is a paid product — the free Claude.ai tier won't authenticate.

  1. Go to claude.ai and sign up (email or Google works).
  2. Verify your email.
  3. Pick a plan from the table below and subscribe at claude.ai/upgrade.
Free

Does not include Claude Code. The CLI will refuse to authenticate. Don't bother.

$0per month
Recommended
Pro

The cheapest plan that includes Claude Code. Fits most starting-out cases — focused coding sessions, small to medium repos.

$20per month
Max 5x

Roughly 5x the usage of Pro. The right move if you're hitting Pro limits weekly or working in big repos.

$100per month
Max 20x

For all-day Claude Code use, agent teams, multiple concurrent sessions. Overkill for first-time setup.

$200per month
Part Two — The Steps

Now the machine.

Plan on one reboot in the middle. Don't skip steps.

Open PowerShell as Administrator

Press the Windows key, type powershell, then click "Run as Administrator" on the right. Click Yes on the UAC prompt.

Your prompt should say PS C:\Windows\system32>.

Install WSL with Ubuntu

Paste this command and press Enter. It downloads WSL2 and Ubuntu — takes a few minutes.

PowerShell · Administrator
PS> wsl --install -d Ubuntu

Reboot the machine

Required. Don't skip.

Ubuntu auto-launches after reboot

If it doesn't, press the Windows key, type ubuntu, press Enter.

Create your Linux user

Ubuntu prompts for a username and password. Use lowercase, no spaces. The password won't show as you type — that's normal.

Remember the password; you'll need it for sudo later.

Update Ubuntu

Paste this and press Enter. Enter your password when asked.

Ubuntu · WSL2
$ sudo apt update && sudo apt upgrade -y

Let it finish — could be a couple of minutes.

Install curl

Needed for the Claude Code installer.

Ubuntu · WSL2
$ sudo apt install curl -y

Install Claude Code

The native installer. No Node.js required.

Ubuntu · WSL2
$ curl -fsSL https://claude.ai/install.sh | bash

Wait for "Claude Code successfully installed!"

Reload your shell

So the PATH picks up.

Ubuntu · WSL2
$ source ~/.bashrc

Verify the install

Ubuntu · WSL2
$ claude doctor

You want "Currently running: native" with a version. If you get "command not found," close the Ubuntu window completely, reopen, try again.

Launch and log in

Ubuntu · WSL2
$ claude

A browser window opens on Windows. Log in with your Anthropic account, approve, return to the terminal.

Set up a project the right way

This part matters — keep your project files inside the Linux filesystem, not on /mnt/c/.... Accessing Windows files from WSL is dramatically slower.

Ubuntu · WSL2
$ mkdir -p ~/projects/test-claude
$ cd ~/projects/test-claude
$ claude

Type hello. If it answers, you're done.

Appendix

For daily use.

Re-entering Ubuntu

Open it from the Start menu, or run wsl from any PowerShell window.

Browse WSL files from Windows

Type \\wsl$\Ubuntu\home\yourusername\projects into the File Explorer address bar.

Better terminal

Install Windows Terminal from the Microsoft Store. It auto-detects Ubuntu and gives you tabs.

VS Code integration

Install VS Code on Windows, add the "WSL" extension, then run code . from inside any Ubuntu project directory.

The whole exercise is closer to installing Spotify than to what setting up a development environment used to be. The harder skill, which this guide doesn't teach, is what to do with Claude Code once it's running.