Claude Code now installs natively on Windows via PowerShell, no WSL or Node.js needed. Here's the native vs WSL install, step by step, with real fixes for PATH and Defender errors.
Vamsi Tallapudi
Manager, Architect Technology at Cognizant
Claude Code finally runs on Windows without WSL. You open PowerShell, run one line (irm https://claude.ai/install.ps1 | iex), and you're building in minutes: no Node.js, no Linux subsystem, no Git Bash detour unless you want one. WSL2 is still the better call if you need sandboxed command execution or a Linux toolchain, but for most Windows devs the native installer is now the right default.
I've installed Claude Code on three different Windows machines this month (a work laptop locked down by IT, a personal gaming rig, and a cheap ARM64 Surface) and the native path worked cleanly on all three. The WSL path only tripped me up once, and it was my own fault for running an old WSL1 distro.
Here's the full breakdown: what changed, how to install both ways, and the errors you'll actually hit.
No. Claude Code has run natively on Windows since mid-2025, and the native installer (no Node.js dependency at all) went generally available on October 31, 2025. You can install, run, and update Claude Code entirely from PowerShell or CMD today.
WSL still matters for one specific reason: sandboxing. Anthropic's official setup docs lay out the tradeoff in a table: native Windows doesn't support sandboxed command execution, WSL2 does, and WSL1 doesn't either. If you're running untrusted code, working with Linux-only toolchains, or just want the extra isolation layer, WSL2 is the right pick. If you're doing normal Windows-native development (.NET, a React app in a plain folder, PowerShell scripts), native install is simpler and faster.
Pulled straight from the official system requirements:
That last one surprises people coming from six-month-old tutorials. Git for Windows used to be a near-requirement because Claude Code routed every shell command through Git Bash. That changed with the PowerShell tool.
PS C:\Users\YourName>. Note the PS prefix.irm https://claude.ai/install.ps1 | iex
claude --version
You should see something like 2.1.211 (Claude Code). If you get an error instead, skip to the troubleshooting section below.
cd into a project folder and run claude to start your first session. You'll be prompted to log in through your browser.Same installer, different syntax, because CMD doesn't understand irm or PowerShell's pipe-to-execute pattern:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
If you accidentally paste the PowerShell command into CMD, you'll get 'irm' is not recognized as an internal or external command. If you paste the CMD command into PowerShell, you'll get The token '&&' is not a valid statement separator. Those two errors are the fastest way to tell which shell you're actually in.
You don't need Administrator rights for either method. That's a change from early guides: I still see tutorials from January telling people to right-click "Run as Administrator," and it's unnecessary now.
winget install Anthropic.ClaudeCode
One catch: WinGet installs don't auto-update. The native PowerShell/CMD installer does. It checks for updates on startup and patches itself in the background. If you go the WinGet route, you'll need to run winget upgrade Anthropic.ClaudeCode yourself every so often, or Claude Code will quietly fall behind on model support.
If you've decided you want sandboxing or a Linux-first workflow, install WSL2 first (wsl --install from an admin PowerShell, then reboot), then run the Linux installer inside your WSL distro's terminal, not from PowerShell or CMD:
curl -fsSL https://claude.ai/install.sh | bash
That's it. You launch and use claude from inside the WSL terminal going forward. Mixing native Windows and WSL installs on the same machine works fine: they're separate installations with separate config, so don't expect your WSL settings or MCP servers to carry over to the Windows side.
| Native Windows | WSL2 | WSL1 | |
|---|---|---|---|
| Requires | Nothing (Git for Windows optional) | WSL2 enabled | WSL1 enabled |
| Sandboxed command execution | Not supported | Supported | Not supported |
| Node.js needed | No (native installer) | No | No |
| Best for | Windows-native projects, .NET, PowerShell scripts | Linux toolchains, sandboxed execution | Only if WSL2 isn't available |
| Shell tool used | PowerShell tool (or Bash via Git for Windows) | Bash | Bash |
My honest take: unless you specifically need sandboxing or you're already living in a Linux-based toolchain, skip WSL. It's one more layer between you and your files, and the native installer has caught up on features. I only reach for WSL2 now when a client project genuinely needs a Linux-only build step.
This is the part that's actually new for 2026. Claude Code shipped a native PowerShell tool in v2.1.84 (March 26, 2026). Before that, every Windows shell command got translated through Git Bash, which was slow and occasionally mangled Windows-style paths. The PowerShell tool spawns pwsh.exe or powershell.exe directly and runs real cmdlets.
Today, the behavior splits like this:
If Claude Code can't find your Git Bash install, point it manually in settings.json:
{
"env": {
"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
}
}
My recommendation: install Git for Windows anyway. You'll want Git installed for version control regardless, and having both the Bash tool and PowerShell tool available means Claude Code can pick the right one for the job instead of forcing everything through PowerShell syntax.
"claude is not recognized as a command": the install directory isn't on your PATH yet. Press Win+R, type sysdm.cpl, go to Advanced → Environment Variables, and under User Variables add %USERPROFILE%\.local\bin to Path. Restart every open terminal, not just the current one.
Long path errors during npm-based installs: old Windows versions cap paths at 260 characters, and deep node_modules trees plus a OneDrive-synced folder blow past that fast. Fix it as Administrator:
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1
git config --system core.longpaths true
Reboot after. This mostly affects the npm install path, not the native installer.
Windows Defender flags or slows Claude Code down: Defender scans every file Claude reads, which adds up on large repos. Add your project folder to Defender's exclusion list: Settings → Privacy & security → Windows Security → Virus & threat protection → Manage settings → Exclusions.
npm install fails or warns on an old Node version: if you're using the npm method (npm install -g @anthropic-ai/claude-code@latest) instead of the native installer, you need Node.js 22 or later. Older versions print an EBADENGINE warning but usually still complete. Honestly, just use the native installer and skip this entire category of problem.
Check your install and catch config issues before they bite you:
claude --version
claude doctor
claude doctor is read-only: it won't start a session, it just prints diagnostics on install health and settings-file errors.
Native installs update themselves in the background. To force one immediately:
claude update
To uninstall a native install completely:
Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force
Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force
Add Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force if you want your settings and MCP config gone too, but that wipes allowed tools, session history, and everything else, so only do it if you're starting fresh.
Before you can do any of this, you need a Pro, Max, Ultra, Team, Enterprise, or Console account: worth checking what Claude Code actually costs before you commit to a plan. If you'd rather skip the terminal entirely, Anthropic also ships a Desktop app with session management for Windows now. And if you're running any AI coding agent on a work Windows machine, it's worth knowing what telemetry it's sending back before you point it at client code.
The native installer is the right default for almost everyone reading this. Save WSL for when you actually hit its specific use case (sandboxing or a Linux-only build chain) instead of installing it out of habit because an old tutorial told you to.
New AI tools, automation workflows, and course drops — straight to your inbox. Join 2,400+ builders.
Google's Gmail and Drive MCP servers went GA on Nov 24, 2026. Here's how to wire Gmail MCP into Claude Code before the Feb 1, 2027 REST API throttling deadline.
1Password confirmed a breach after an employee's GitHub account was compromised. Here's exactly what data was taken, what wasn't, and what to actually do now.
fast-anything profiles your Python or Node app, has Claude Code port the slowest function to Rust, and verifies it against 500 real calls before swapping it in.
Comments