One evening I reopened this article, meant for people setting up Claude Code on a Windows PC, and compared it against the official setup page line by line. I found several things that were simply wrong — "Node.js is bundled," "open PowerShell as Administrator," and a few more.
My daily machine is an iMac at home, not a Windows PC. So when I fixed this page, I made one rule for myself: follow the official docs, not my memory. What follows is the result.
The thing I'd like to say first is how to choose. The official comparison table treats sandboxing as the main difference between native Windows and WSL, and I think that's the right axis.
Native Windows or WSL2?
Here is the official breakdown.
| Option | Requires | Sandboxing | When to use | | - | - | - | - | | Native Windows | Nothing (Git for Windows is optional) | Not supported | Windows-native projects and tools | | WSL 2 | WSL 2 enabled | Supported | Linux toolchains or sandboxed command execution | | WSL 1 | WSL 1 enabled | Not supported | If WSL 2 is unavailable |
As a rule of thumb:
- If you mostly work on Windows apps, .NET, or PowerShell workflows, native is the easy path.
- If your project leans on Makefiles and shell scripts, or you want to restrict what commands can touch, WSL 2 fits better.
You can install both. Just remember they are separate installations with separate settings, so it helps to know which one you're in at any moment.
Option A: Install the native version
Step 1 — Check the prerequisites
- Windows 10 1809 or later, or Windows Server 2019 or later
- 4 GB of RAM or more
- An internet connection
You do not need Administrator rights. An earlier version of this page told you to open PowerShell as Administrator; the official docs don't ask for that.
Step 2 — Run the installer
In PowerShell:
irm https://claude.ai/install.ps1 | iexIn CMD:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdThe installer shows no progress while it downloads, so don't worry if it looks stuck for a while.
The classic mix-up is PowerShell versus CMD. If you see The token '&&' is not a valid statement separator, you pasted the CMD command into PowerShell. If you see 'irm' is not recognized, it's the reverse. A prompt starting with PS C:\ is PowerShell; without the PS, it's CMD.
The native build is a standalone binary and does not need Node.js.
Step 3 — Verify in a new terminal
Open a fresh terminal window, then run:
claude --versionIf a version number prints, you're done. If claude isn't found, the install directory isn't on your PATH yet — see the troubleshooting section below.
Step 4 — Sign in and start
There is no separate login command you have to run first. Start Claude Code in your project folder and follow the browser prompt:
cd C:\Users\YourName\projects\my-app
claudeYou need a Pro, Max, Team, Enterprise, or Console account; the free claude.ai plan does not include Claude Code.
Git for Windows helps, but it's optional
With Git for Windows installed, Claude Code uses Git Bash for its Bash tool. Without it, the PowerShell tool takes over as the shell. If Claude Code can't find Git Bash, point to it in settings.json:
{
"env": {
"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
}
}I cover the PowerShell tool in the Claude Code PowerShell Tool Windows Guide.
WinGet works too
winget install Anthropic.ClaudeCode is available. WinGet installs don't auto-update, so you'll run winget upgrade Anthropic.ClaudeCode yourself; the native installer updates in the background.
If you'd rather not remember that, set the environment variable CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE to 1. Claude Code then runs the upgrade in the background when a new version ships and prompts you to restart. On WinGet the upgrade can fail while Claude Code is running, because Windows locks the executable; in that case it shows the manual command instead.
If you'd rather choose how fast updates arrive, set autoUpdatesChannel to "stable" in your settings. Per the official docs, that serves a version about a week old and skips releases with major regressions. On a PC you rely on for work, it's worth considering.
Option B: Use it through WSL
Step 1 — Enable WSL
In an Administrator PowerShell:
wsl --installThis is the one step that may ask for a reboot. After restarting, Ubuntu opens and asks you to create a username and password.
Step 2 — Install inside the WSL terminal
Open your WSL distribution (the Ubuntu window, not PowerShell or CMD) and use the Linux installer:
curl -fsSL https://claude.ai/install.sh | bashYou don't need to install Node.js first. I used to write an npm-based path here. The npm package exists (it needs Node.js 22 or later), but it delivers the same native binary, so the installer is usually fewer steps.
Step 3 — Launch from inside WSL
Run claude from the WSL terminal. Typing claude in PowerShell won't reach the WSL copy.
cd ~/projects/my-app
claudeKeep your project where WSL is fast
Under WSL 2, keep projects in the Linux filesystem (~/projects/, for instance). Reading Windows files through /mnt/c/Users/... can be noticeably slower, and you feel it most in search-heavy or build-heavy work.
Leave instructions in CLAUDE.md
With either option, a CLAUDE.md at the project root gets loaded so you don't repeat yourself every session.
# My Project
## Coding style
- Use TypeScript (ES Modules)
## Common commands
- `npm run dev` — start the dev server
- `npm test` — run the testsWriting too much at the start can stall you. Two or three lines under "Common commands" are plenty to begin with. When you're ready for automation, see the Claude Code Hooks Complete Guide 2026.
Snags worth knowing
claude is not recognized
The install directory isn't on your PATH. Reopen the terminal first. If that doesn't help, the native default is %USERPROFILE%\.local\bin, so add it:
$env:PATH += ";$env:USERPROFILE\.local\bin"That only affects the current window. For a permanent change, add the same folder to your user PATH in the environment variable settings.
The installer fails with a 403 or similar
The official installation troubleshooting page matches error messages to fixes. If you're behind a corporate network or proxy, start there.
You've lost track of which install you're using
Run claude doctor. It prints read-only diagnostics — install health, settings validation, suggested fixes — so it's safe to try.
For other startup problems, see the Claude Code Setup Troubleshooting FAQ and the Claude Code Not Starting Checklist.
Pinning a version, and removing it cleanly
On a work PC there comes a point where you want everyone on the same build instead of whatever shipped this morning. The official setup page shows how to hand the native installer a channel or a version number. In PowerShell:
# Install from the stable channel (typically about a week behind)
& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) stable
# Install a specific version
& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) 2.1.89Check what landed with claude --version. To apply an update right now instead of waiting for the background check, run claude update.
For the opposite case, here is the removal path. The native install comes out with two PowerShell commands; if you used WinGet, it's winget uninstall Anthropic.ClaudeCode.
Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force
Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -ForceYour settings and session history live in %USERPROFILE%\.claude and .claude.json, and the commands above leave them alone. Deleting them wipes settings, allowed tools, MCP configuration and history, so if you only want a reinstall, I'd keep them.
If claude still runs after you removed it, a second installation from a different route is probably still there. Run claude doctor first, then follow the official troubleshooting page for finding conflicting installs.
Pairing with VS Code
You can launch claude from VS Code's integrated terminal as is. For the extension workflow, see the Claude Code VS Code Extension Productivity Guide. If you use WSL, connecting VS Code to WSL as well keeps file locations consistent.
One last thing
In short: native if your work is Windows-centered, WSL 2 if you need the sandbox or Linux tooling.
Check steps against the official docs instead of trusting memory. That's the line I'm holding on to after fixing this page. If you're about to start, run irm https://claude.ai/install.ps1 | iex in PowerShell, then confirm with claude --version.