Claude Code on Windows: Native or WSL, and How to Install Each
Claude Code runs natively on Windows without WSL, or inside a WSL distribution. Which to pick, the exact install command for each, where Windows keeps your settings and sign-in, and the errors Windows users actually hit.
7 min read
Claude Code runs on Windows in two ways: natively, installed from PowerShell or CMD with one command, or inside WSL, installed with the Linux command from your distribution’s terminal. You do not need WSL. Native is the simpler route for Windows projects; WSL 2 is the route if your toolchain is Linux or you want Claude Code’s sandbox, which native Windows does not support. Either way you need Windows 10 1809 or later (or Windows Server 2019 or later), a 64-bit machine and a paid Claude account.
Native Windows or WSL: which to choose
Anthropic’s setup guide (opens in a new tab) lays out three options, and the choice mostly follows where your code lives:
- Native Windows. Needs nothing extra; Git for Windows is optional. No sandboxing. Use it for Windows-native projects and tools: .NET, a Node app you run from PowerShell, anything under
C:\. - WSL 2. Needs WSL 2 enabled. Sandboxing is supported. Use it when your project builds with a Linux toolchain, or when you want commands isolated in the sandbox.
- WSL 1. Supported for installs, without sandboxing. Use it only if WSL 2 is unavailable on the machine.
One rule decides a lot: keep the project on the same side as Claude Code. The troubleshooting page (opens in a new tab) warns that working across file systems in WSL, on a repository under /mnt/c/, can make search return fewer matches than it should. If you run Claude Code in WSL, keep the repository under /home/; if your code has to stay on the Windows drive, run Claude Code natively.
Before you install
- Windows 10 version 1809 or later, or Windows Server 2019 or later, on an x64 or ARM64 processor with at least 4 GB of RAM. 32-bit Windows is not supported.
- An account: Claude Pro, Max, Team or Enterprise, or a Claude Console account. The free Claude.ai plan does not include Claude Code.
- An internet connection that can reach
downloads.claude.ai. Corporate proxies are the most common reason the installer fails. - For WSL only: WSL enabled, with a distribution such as Ubuntu installed.
You do not need Node.js for the recommended installer, and you do not need to run anything as Administrator.
Install natively from PowerShell or CMD
Open Windows Terminal or PowerShell and run the command for the shell you are in. Your prompt starts with PS C:\ in PowerShell and with just C:\ in CMD; running one shell’s command in the other is the single most common install error.
# PowerShell irm https://claude.ai/install.ps1 | iex # CMD curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd # Then, in a NEW terminal window claude --version
The installer puts claude.exe in %USERPROFILE%\.local\bin. Open a new terminal before checking the version, because the window you installed from keeps its old PATH. There is also a WinGet package, winget install Anthropic.ClaudeCode; it works, but it does not update itself, so you run winget upgrade Anthropic.ClaudeCode yourself.
Git for Windows, Git Bash and the PowerShell tool
Claude Code needs a shell to run commands. On native Windows it uses Git Bash when Git for Windows is installed, and PowerShell when it is not. Git for Windows is optional, but many repositories’ scripts assume Bash, so installing it is usually worth the minute it takes. Tick “Add to PATH” during setup. With Git installed, the PowerShell tool stays available alongside Bash for claude.ai and Console accounts.
Claude Code looks for bash.exe under C:\Program Files\Git, then via the git on your PATH. If Git lives somewhere else, point it there in %USERPROFILE%\.claude\settings.json:
{
"env": {
"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
}
}Install inside WSL
If WSL is not set up yet, Microsoft’s WSL install guide (opens in a new tab) is one command in an Administrator PowerShell, then a restart. After that, everything happens inside the distribution: you install and launch claude in the WSL terminal, never from PowerShell or CMD.
# Administrator PowerShell (once), then restart wsl --install # Inside your WSL distribution curl -fsSL https://claude.ai/install.sh | bash cd ~/projects/my-app claude
Two WSL-specific snags. Sign-in: the browser opens on Windows and often cannot redirect back into WSL, so it shows a code instead; paste it at the “Paste code here if prompted” prompt. If no browser opens at all, set BROWSER to your Windows browser’s path. And on WSL 1, cannot execute binary file: Exec format error is a known problem with the native binary; the cleanest fix is wsl --set-version <DistroName> 2 from PowerShell.
Where settings and credentials live on Windows
The documentation writes paths as ~/.claude. On Windows, per the settings page (opens in a new tab), ~/.claude means %USERPROFILE%\.claude. So:
%USERPROFILE%\.claude\settings.json— your user settings, for every project on the machine.%USERPROFILE%\.claude.json— a file Claude Code writes for itself: your sign-in session, MCP server configurations and per-project state such as which folders you trusted. You do not need to edit it.%USERPROFILE%\.claude\.credentials.json— your login. Per the authentication docs (opens in a new tab), it inherits the access controls of your user profile folder, which restrict it to your account by default. It is a plain file rather than a keychain entry, so it is protected by your Windows account and nothing more..claude\and.mcp.jsoninside each project — project settings and shared MCP servers; what belongs in git is covered in Claude Code project structure.
WSL is a Linux install, so it follows the Linux paths inside the distribution: ~/.claude and ~/.claude.json in your Linux home, separate from the Windows ones. A server you add or a setting you change on one side does not appear on the other. To keep the home-directory files somewhere else, set CLAUDE_CONFIG_DIR.
Windows gotchas the docs name
irm is not recognized, orThe token && is not a valid statement separator: you ran the other shell’s command.A parameter cannot be found that matches parameter name fsSLorbash is not recognizedmeans you pasted the macOS or Linux command into PowerShell.claudeis not recognized after installing: open a new terminal. If it still fails,%USERPROFILE%\.local\binis missing from your user PATH; the installation troubleshooting page (opens in a new tab) has the one-line PowerShell fix.Claude Code does not support 32-bit Windowson a 64-bit machine: you opened “Windows PowerShell (x86)” from the Start menu. Open the entry without x86.running scripts is disabled on this system: PowerShell’s execution policy is blocking npm’s launcher scripts. Use the PowerShell installer instead of npm.The process cannot access the fileduring install: an earlier install or an antivirus scan holds%USERPROFILE%\.claude\downloads. Close other installer windows, delete that folder and run the installer again.claudevanished right after an update: the update renamesclaude.exeaside first; if it fails midway, aclaude.exe.old.<timestamp>backup is left. Rename the newest one back toclaude.exe.- Keys:
Shift+Enterfor a new line works natively in Windows Terminal. IfShift+Tabdoes not cycle permission modes, useAlt+M. Paste an image withAlt+V. Type forward slashes in paths for autocomplete, even on Windows.
Updating and uninstalling
A native install updates itself in the background; the new version takes effect next time you start it. Run claude update to update now, and claude doctor to see the installation’s health and the result of the last update. If you would rather trail new releases by about a week, set "autoUpdatesChannel": "stable" in your settings. WinGet installs need winget upgrade Anthropic.ClaudeCode.
Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force # Optional, and irreversible: settings, MCP servers, session history Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force Remove-Item -Path "$env:USERPROFILE\.claude.json" -Force
The VS Code extension and the Desktop app write to %USERPROFILE%\.claude too, so uninstall them first if you want the folder gone for good. In WSL, uninstall with the Linux commands inside the distribution.
Once it runs: give it somewhere to report
A working install on Windows behaves like one anywhere else, so the next step is the same: tell it where the work list lives. Connect a fenbs board with claude mcp add --transport http fenbs https://fenbs.ai/api/mcp, then /mcp to sign in through the browser. If you use both a native install and WSL, connect from each, since each keeps its own configuration. What to put in CLAUDE.md so it reads and updates the board by itself is in a task-tracking workflow for Claude Code.
Next steps
First session after installing: Claude Code for beginners. Prefer an editor or an app to the terminal: Claude Code in VS Code and Desktop app vs CLI vs VS Code. Connecting the board: the Claude Code integration and the MCP docs.