Claude Code runs natively on Windows 10 1809 or newer (and Windows Server 2019 or newer), on an x64 or ARM64 processor, with at least 4 GB of RAM. The native install is one command in PowerShell or CMD and does not need administrator rights. The installer downloads a claude.exe and puts it in %USERPROFILE%\.local\bin. The alternative is to install inside WSL, as on any Linux. The most common errors come from running the command in the wrong shell or from a PATH that was not updated.
This post is one of the hands-on guides in the Claude Code guide. The steps follow the official setup docs and install troubleshooting guide. The outputs shown were captured on October 12, 2026 on a clean Windows Server 2025 (build 26100, x64), without login, with Claude Code 2.1.296.
Choose between native Windows and WSL
| Option | Needs | Sandbox | When to use it |
|---|---|---|---|
| Native Windows | Nothing; Git for Windows is optional | Not supported | Windows projects and tools |
| WSL 2 | WSL 2 enabled | Supported | A Linux toolchain or sandboxed command execution |
| WSL 1 | WSL 1 enabled | Not supported | Only if WSL 2 is not available |
Install Claude Code in the same environment where the project runs. A .NET project in C:\dev goes native. A Python or Node project you already run in WSL's Ubuntu goes in WSL. Mixing them (project in C:\, Claude Code in WSL reaching it through /mnt/c/) works, but search gets slower and can return fewer results, according to the docs.
Check the requirements before installing
Two checks prevent common errors. In PowerShell:
[Environment]::Is64BitOperatingSystem # must be True
[Environment]::Is64BitProcess # must be True as wellIn the test, both lines returned True. In the x86 entry, the second one returns False, and the installer refuses to continue:
Claude Code does not support 32-bit Windows. Please use a 64-bit version of Windows.The installer refuses a 32-bit process. The Start menu has two entries, Windows PowerShell and Windows PowerShell (x86), and the second one is 32-bit even on 64-bit Windows. If the first line returns True and the second False, you opened the x86 entry.
The other check is your account. Claude Code requires a Pro, Max, Team or Enterprise plan or a Console account. The free claude.ai plan does not include access. You can also use it through Amazon Bedrock, Google Cloud or Microsoft Foundry.
Install from PowerShell
Open PowerShell (the prompt starts with PS C:\) and run:
irm https://claude.ai/install.ps1 | iexThere is no progress bar during the download (the binary is about 260 MB). In the test, the command took 24 seconds and printed:
Setting up Claude Code...
Checking installation status...
Installing Claude Code native build latest...
Setting up launcher and shell integration...
‼ Setup notes:
● Native installation exists but C:\Users\runneradmin\.local\bin is not in your PATH. Add it by opening: System Properties → Environment Variables → Edit User PATH → New → Add the path above. Then restart your terminal.
√ Claude Code successfully installed!
Version: 2.1.296
Location: C:\Users\runneradmin\.local\bin\claude.exe
Next: Run claude --help to get started
✅ Installation complete!Read the Setup notes. It says the installer did not add %USERPROFILE%\.local\bin to the PATH. We checked, and neither the session PATH nor the user PATH changed. Without this manual step, claude is not found in any new terminal. Reading the script shows the rest: it refuses a 32-bit process, picks the x64 or ARM64 binary, downloads it to %USERPROFILE%\.claude\downloads, checks the SHA256 and only then installs.
To install the stable channel (usually about a week behind the newest version, skipping versions with serious regressions) or a specific version:
& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) stable
& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) 2.1.89On the day of the test, stable installed 2.1.287, while the default channel was on 2.1.296.
Or install from CMD
In Command Prompt (the prompt is C:\ without the PS):
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdIt worked the same as PowerShell, with the same output and the same PATH warning. The two commands belong to different shells. Running each one in the wrong shell gave this:
| Where it ran | Command | Result |
|---|---|---|
| CMD | irm ... | iex | 'irm' is not recognized as an internal or external command, operable program or batch file. |
| Windows PowerShell 5.1 (the one that ships with Windows) | curl ... && install.cmd ... | The token '&&' is not a valid statement separator in this version. |
PowerShell 7 (pwsh) | curl ... && install.cmd ... | Fails on install.cmd, because PowerShell does not run a file from the current folder without .\. With .\install.cmd, it installs. |
| Windows PowerShell 5.1 | curl -fsSL https://claude.ai/install.sh | bash (the Linux one) | Invoke-WebRequest : A parameter cannot be found that matches parameter name 'fsSL'. (in 5.1, curl is an alias for Invoke-WebRequest) |
Or install with WinGet
winget install Anthropic.ClaudeCodeIn the test, WinGet installed 2.1.292, four versions behind the native installer on the same day. It also handles the PATH differently. It created the shortcut %LOCALAPPDATA%\Microsoft\WinGet\Links\claude.exe and warned Path environment variable modified; restart your shell to use the new value. In a new terminal, claude worked without changing anything.
The other difference is updates. The native install updates itself in the background. The WinGet one does not. Run winget upgrade Anthropic.ClaudeCode from time to time, or set CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE=1 so Claude Code runs the upgrade for you. Even then, the upgrade can fail while Claude Code is open, because Windows locks an executable in use.
Install Git for Windows (recommended)
Git for Windows is optional, but recommended on native Windows. It brings Git Bash, which Claude Code's Bash tool uses:
- Without Git for Windows, Claude Code runs commands through the PowerShell tool.
- With Git for Windows, it uses Git Bash for the Bash tool, and the PowerShell tool is available alongside it.
Git for Windows puts bash.exe in C:\Program Files\Git\bin\. Watch out for the bash.exe in C:\Windows\System32, which is WSL's. If Git is installed in a non-standard location and Claude Code cannot find bash.exe, set the path in settings.json:
{
"env": {
"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
}
}Double the backslashes. With single backslashes in C:\Program Files\..., the JSON is invalid, and claude doctor reports Invalid settings with settings.json: Invalid or malformed JSON. A path that does not exist, on the other hand, passes doctor without a warning.
Verify the install and log in
If you used the native installer, first add %USERPROFILE%\.local\bin to the user PATH (the path the Setup notes showed). Then open a new terminal (the one already open keeps the old PATH) and run:
claude --version
claude doctorThe first one prints 2.1.296 (Claude Code) (or your version). claude doctor works before login and exited with code 0. Real output, with no account connected:
Claude Code doctor
Running: native (2.1.296)
Commit: fdb6c17a97b6
Platform: win32-x64
Path: C:\Users\runneradmin\.local\bin\claude.exe
Config install method: native
Search: OK (bundled)
Auto-updates: enabled
Auto-update channel: latest
Last update attempt: none recorded
Managed settings (remote): not fetched — no usable credentials for the settings fetch
Organization policy: not fetched: no API key or claude.ai sign-in for the policy lookup (apiKeyHelper keys are not used for it)
Remote Control
Remote Control requires a claude.ai subscription. Run claude auth login to sign in with your claude.ai account.
- Not signed in to claude.ai
...
No installation issues found.The line that matters is No installation issues found.. The Remote Control and policy lines only say you have not logged in yet. When installed through WinGet, doctor shows Running: package-manager, Package manager: winget and Auto-updates: Managed by package manager. In Git Bash, the same claude --version works once the folder is in the Windows PATH.
Then go into the project folder and run claude. Login opens in the browser. Without login, claude -p "hi" exits with code 1 and Not logged in · Please run /login.
Install in WSL, if that is your choice
Open the distribution (Ubuntu, for example) and run the Linux installer inside it:
curl -fsSL https://claude.ai/install.sh | bashInstallation and use happen in the WSL terminal, not in PowerShell. WSL does not need Git for Windows. Keep the project in the Linux file system (/home/...) instead of /mnt/c/... for search performance. If you are on WSL 1 and see cannot execute binary file: Exec format error, it is a known regression. The cleanest fix is to convert to WSL 2 from PowerShell:
wsl --set-version <DistroName> 2Adjust the project for Windows
Two things from the other guides in this series change on native Windows:
- Exec form hooks need a real executable. With
args, the command has to resolve to an.exe. The.cmdand.batshims npm creates innode_modules/.bindo not work; callnodewith the script path. In the hooks guide, the examples usepython3. On Windows, check that this name resolves to apython3.exein your PATH; if not, switch topythonorpy. Withoutargs(shell form), the command runs in Git Bash or, without it, in PowerShell, and theshellfield picks one explicitly. - Skills with command injection use bash by default. In a skill,
shell: powershellin the frontmatter makes!commands run through PowerShell, with the PowerShell tool enabled. Details in How to create a Skill in Claude Code.
How we use it at Capiva
The phase guard in capivaOS is registered with the matcher Bash|PowerShell (hooks.json), not just Bash. On Windows without Git Bash, commands go through the PowerShell tool, and a hook that only watches Bash does not fire. If you write hooks for a team with people on Windows, cover both tools.
Troubleshooting checklist
- [ ]
'irm' is not recognized. You are in CMD. Open PowerShell or use the CMD command. - [ ]
The token '&&' is not a valid statement separator in this version.You are in Windows PowerShell 5.1 running the CMD command. - [ ]
A parameter cannot be found that matches parameter name 'fsSL'or'bash' is not recognized. You copied the macOS/Linux command. Use the Windows one. - [ ] The command prints the script text and installs nothing. You ran only half of it. Copy the whole line.
- [ ]
'claude' is not recognized as an internal or external commandafter installing. With the native installer, this is expected until you add%USERPROFILE%\.local\binto the user PATH (theSetup notes:warns you). Check with$env:PATH -split ';' | Select-String '\.local\\bin'. No output means the folder is not in the PATH. After fixing it, open a new terminal. - [ ]
Claude Code does not support 32-bit Windows. Please use a 64-bit version of Windows.You openedWindows PowerShell (x86). Use the entry without x86. - [ ]
The process cannot access the file ... being used by another process. Another install is open or an antivirus is holding the file. Close the installer windows, delete%USERPROFILE%\.claude\downloadsand run it again. - [ ]
Claude Code on Windows requires either Git for Windows (for bash) or PowerShell. Neither shell was found. The default PowerShell lives inC:\Windows\System32\WindowsPowerShell\v1.0\. Add it to the PATH or install Git for Windows with "Add to PATH" checked. - [ ] You installed only the VS Code extension and
claudedoes not exist in the terminal. The extension ships its own copy of the CLI and does not touch the PATH. Run the normal install. - [ ] Slow or incomplete search in WSL. The project is in
/mnt/c/. Move it to/home/.
Frequently asked questions
Do I need to run it as administrator?▼
No. The docs say the native install does not need administrator rights.
Do I need Node.js?▼
Not for the native install or for WinGet. The installer downloads a claude.exe of about 260 MB that does not use Node.
Native or WSL: which is better?▼
It depends on where the project lives. WSL 2 is the only option on Windows with a command sandbox.
Is there a version with a graphical interface?▼
There is the Claude Code Desktop app for Windows, which does not need the terminal.
Read next
- Claude Code is a harness: CLAUDE.md, hooks, MCP and subagents (the main guide)
- How to write a CLAUDE.md the agent follows, the first file to create after installing
- How to configure hooks in Claude Code
- How to create a Skill in Claude Code
- How to build an MCP server in Python and configure it in Claude Code
Installed it and want Claude Code working with phases and gates from day one? See capivaOS.