Last updated: November 26, 2026
TL;DR
Claude Code runs natively on Windows 10 1809 or later and Windows Server 2019 or later, and it runs inside WSL. Pick by where your projects live and what you need. Native Windows fits Windows-native projects and tools, needs no WSL and no Administrator rights, and works without Git for Windows, but it can't sandbox commands. WSL 2 fits Linux toolchains and is the only Windows option where sandboxing is supported. WSL 1 is for when WSL 2 isn't available, and it has a known native-binary bug. On native Windows, installing Git for Windows decides which shell Claude Code uses: Git Bash if it's there, PowerShell if it isn't. Everything below comes from Anthropic's setup docs, tools reference and install troubleshooting page.
Native, WSL 2 or WSL 1
| Option | Needs | Sandboxing | Pick it when |
|---|---|---|---|
| Native Windows | Nothing; Git for Windows is optional | Not supported | Your projects and tools are Windows-native |
| WSL 2 | WSL 2 enabled | Supported | You work with Linux toolchains, or want sandboxed command execution |
| WSL 1 | WSL 1 enabled | Not supported | WSL 2 isn't available to you |
The sandboxing column matters more than it looks. Anthropic's sandboxing docs describe the sandbox as a boundary the operating system enforces around the shell commands Claude runs, limiting which files and network hosts they can reach, and with auto-allow mode sandboxed commands can run without asking you. On native Windows, commands run unsandboxed, and WSL 1 isn't supported either, so on a Windows machine WSL 2 is the route. Our sandbox guide covers setting it up. Without it, your permission rules carry the whole load.
Whichever you pick, the hardware floor is the same: 4 GB of RAM or more and an x64 or ARM64 processor. Claude Code doesn't support 32-bit Windows.
Set up native Windows
- Install from PowerShell or CMD. You don't need to run as Administrator. In PowerShell:
irm https://claude.ai/install.ps1 | iex
In CMD:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Your prompt shows PS C:\ in PowerShell and C:\ without the PS in CMD. WinGet works too (winget install Anthropic.ClaudeCode), but a WinGet install doesn't update itself: run winget upgrade Anthropic.ClaudeCode now and then. The native installer updates in the background.
-
Decide on Git for Windows. It's optional, and it changes the shell:
- Without it, Claude Code runs shell commands through the PowerShell tool.
- With it, Claude Code uses Git Bash for the Bash tool. The Monitor tool on Windows is only available with Git Bash installed.
-
Point it at Git Bash if it can't find it. In the
envblock of your settings file, setCLAUDE_CODE_GIT_BASH_PATHto the full path ofbash.exein your Git for Windows install folder, underGit\bin. -
Open a new terminal and run
claudein your project folder. If the shell says'claude' is not recognized, the install folder,%USERPROFILE%\.local\bin, isn't on your PATH yet. The installer reports that underSetup notes:and prints the fix, but it doesn't change PATH for you. Runclaude doctorfor a read-only check of the install and your settings.
The PowerShell tool alongside Git Bash
With Git for Windows installed, the PowerShell tool is still there: on by default for claude.ai and Console accounts, and turned on with CLAUDE_CODE_USE_POWERSHELL_TOOL=1 for Amazon Bedrock, Google Cloud's Agent Platform and Microsoft Foundry sessions. Set it to 0 to turn it off. When it's on, Claude treats PowerShell as the primary shell and keeps Bash for POSIX scripts.
A few details from the docs worth knowing before you rely on it:
- It uses PowerShell 7 (
pwsh.exe) when it finds it and falls back to Windows PowerShell 5.1. - It runs with the execution policy bypassed for its own process only, so
.ps1scripts work on a default install; Group Policy still applies. SetCLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY=1to respect the machine's policy instead. - Your PowerShell profile isn't loaded, so aliases and functions defined there aren't available to Claude.
- A scoped Bash deny rule turns the PowerShell tool off without a warning. Keep it on with
CLAUDE_CODE_USE_POWERSHELL_TOOL=1or aPowerShell(...)permission rule of its own. - Hooks that inspect shell commands should match
Bash|PowerShell, notBashalone; our hooks guide covers matchers.
Set up WSL
Open your WSL distribution and run the Linux installer there:
curl -fsSL https://claude.ai/install.sh | bash
You install and launch claude inside the WSL terminal, not from PowerShell or CMD. WSL doesn't need Git for Windows. Three things trip people up:
- WSL 1 and
Exec format error. Ifclaudeprintscannot execute binary file: Exec format error, you're on WSL 1 and hitting a known native-binary regression. The cleanest fix is converting the distribution to WSL 2 from PowerShell; the troubleshooting page also gives a workaround for staying on WSL 1. - Windows Node inside WSL. This only applies to an npm install. If
claudesaysexec: node: not found, WSL is likely using the Windows Node.js. Runwhich node: a path starting with/mnt/c/is the Windows binary. Install Node inside the distribution, or use the native installer, which doesn't need Node at all. - Signing in when no browser opens. At the login prompt, press
cto copy the login URL, open it in a browser on your machine, and paste the code it shows back atPaste code here. You can also setBROWSERto your Windows browser's path so WSL 2 opens it next time.
What differs once you're running
| Native Windows | WSL 2 | |
|---|---|---|
| Shell Claude uses | Git Bash, or PowerShell without Git for Windows | Bash; the PowerShell tool is opt-in and needs pwsh |
| Sandboxing | Not supported | Supported |
| File search | Glob and Grep tools are part of the default set | Claude searches with find and grep through the Bash tool |
| Memory cap on commands | Documented for Linux and WSL only | CLAUDE_CODE_TOOL_MEMORY_LIMIT, such as 4G |
| Install path | %USERPROFILE%\.local\bin\claude.exe | ~/.local/bin/claude |
If you mostly work in an editor, the shell question follows you there: our VS Code guide covers the extension and the integrated terminal.
Frequently asked questions
Does Claude Code work on Windows without WSL?
Yes. It runs natively on Windows 10 1809 or later and Windows Server 2019 or later. Install it from PowerShell or CMD with no Administrator rights. WSL is optional, and WSL 2 is the Windows option that supports sandboxing.
Do I need Git for Windows for Claude Code?
No. Without it, Claude Code runs commands through the PowerShell tool. With it, Claude Code uses Git Bash for the Bash tool, and the Monitor tool becomes available. WSL setups don't need Git for Windows.
Should I use WSL 2 or native Windows for Claude Code?
Use native Windows for Windows-native projects and tools. Use WSL 2 for Linux toolchains or when you want sandboxed command execution, which native Windows doesn't support. Use WSL 1 only if WSL 2 isn't available.
Why does Windows say claude is not recognized?
The install folder, %USERPROFILE%.local\bin, isn't on your PATH yet. The installer reports this under Setup notes and prints the fix without changing PATH itself. Add the folder, then open a new terminal and run claude again.
How do I fix Exec format error in WSL?
That error means you're on WSL 1 and hitting a known native-binary regression. The cleanest fix is converting your distribution to WSL 2 from PowerShell. Anthropic's troubleshooting page also gives a workaround if you need to stay on WSL 1.
Next: the commands you'll use every day
Once claude starts, the platform mostly stops mattering. Our Claude Code CLI guide covers the commands, flags and shortcuts, and the settings guide shows where your env block and other settings live.
Stop guessing. Score your first workflow.
Score one workflow in about five minutes. Nine questions, a grade, and the specific gap holding it back - no call required.
Related Posts

Claude Code output styles: change how it answers you
What Claude Code's output styles do: the four built-in styles (Proactive, Concise, Explanatory and Learning), how to switch with /output-style or a settings file, how to write a custom style with keep-coding-instructions, and when a hook, skill or CLAUDE.md fits better.

Claude Code and git: what it commits, and how to keep it in check
How Claude Code works with git: the git context it gets, the Co-Authored-By trailer and PR line it adds and how to change them, permission rules for commit and push and where they stop, and why git, not checkpoints, is your real undo.

Resume a Claude Code session: claude -c, claude -r and /resume
How to pick up a Claude Code session where you left it: claude -c for the last one, claude -r by name or ID, the /resume picker and its shortcuts, what a resume restores, and the flags you have to pass again.
