GuidesHosting choices

Claude Code on Windows: native or WSL, install and errors

Install Claude Code on Windows with PowerShell, CMD or WinGet, or in WSL 2: Git Bash vs PowerShell, where settings and sign-in live, and the Windows errors.

November 23, 2026The Everpod team
The short answer

Claude Code runs natively on 64-bit Windows 10 (version 1809 or later) and Windows 11, on x64 or ARM64, and installing it needs no administrator rights. In PowerShell, run irm https://claude.ai/install.ps1 | iex; in CMD, curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd; or use winget install Anthropic.ClaudeCode. Open a new terminal and run claude. Git for Windows is optional: without it, Claude runs its shell commands in PowerShell; with it, Claude also gets Bash through Git Bash.

Use WSL 2 instead when the project and its tools are Linux ones, or when you want Claude’s command sandbox, which native Windows does not have. Install from inside the WSL terminal with the Linux command, curl -fsSL https://claude.ai/install.sh | bash, and keep the project in the Linux filesystem rather than under /mnt/c. As of November 23, 2026 the current release is 2.1.330.

Native Windows or WSL 2

Anthropic supports both, and the Windows section of its setup page puts the choice down to where your projects are and which features you need. What changes between the two:

Native WindowsWSL 2
Install from
PowerShell, CMD or WinGetThe WSL terminal, with the Linux installer
Needs
Nothing; Git for Windows is optionalWSL 2 and a distribution such as Ubuntu
Claude runs commands in
PowerShell, and Git Bash if installedBash
Command sandbox
Not supportedSupported
Settings and sign-in
%USERPROFILE%\.claude~/.claude in the Linux home
Paste an image
Alt+VCtrl+V or Alt+V
Suits
Windows projects and toolsLinux toolchains, sandboxed commands

WSL 1 is the docs’ fallback for machines where WSL 2 is unavailable. It has no sandbox, and the native binary hits a known loader regression there (the Exec format error under the errors below).

The two are separate installations. A copy inside WSL is a Linux program that keeps its settings and sign-in in ~/.claude inside the distribution, and for a VS Code window connected to WSL, Anthropic’s docs say to edit ~/.claude/settings.json on that system, not on your local computer.

Run Claude on the side of the boundary your files are on. A WSL session working on /mnt/c is slow, and Anthropic warns its searches can return fewer matches than on a native filesystem while claude doctor still reports Search as OK; Microsoft’s own advice is “We recommend against working across operating systems with your files”. The reverse holds too: Windows reaching into a distribution’s files “goes through a network filesystem, which is slow and breaks file watching,” in the words of the desktop app’s WSL page.

Install on native Windows

Pick the command for the terminal you are in. The prompt reads PS C:\Users\YourName> in PowerShell and C:\Users\YourName> without the PS in CMD.

# PowerShell
irm https://claude.ai/install.ps1 | iex

# CMD
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

# WinGet, from either
winget install Anthropic.ClaudeCode
Copied

The PowerShell installer refuses to run as a 32-bit process, takes the native ARM64 build when PowerShell runs as an ARM64 process and the x64 build otherwise, downloads it to %USERPROFILE%\.claude\downloads, checks its SHA-256 against the release manifest, and then runs claude install. It shows no progress while it downloads. The program lands at %USERPROFILE%\.local\bin\claude.exe, with its versions under %USERPROFILE%\.local\share\claude, and the executable is signed by “Anthropic, PBC” (Get-AuthenticodeSignature .\claude.exe in that folder shows it). For the stable channel, which runs about a week behind, pass it as an argument:

& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) stable
Copied

Then open a new terminal, because the one you installed from keeps its old PATH, and check:

claude --version     # prints e.g. 2.1.330 (Claude Code)
claude doctor        # install health, settings errors, warnings
Copied

If the folder is not on your PATH

The installer does not edit PATH. When .local\bin is missing from it, the output carries this under Setup notes:, and claude is not recognized until you add the folder:

Native installation exists but C:\Users\you\.local\bin is not in your PATH.
Copied

Anthropic’s fix, for PowerShell, checks the file is there and adds the folder to your user PATH:

Test-Path "$env:USERPROFILE\.local\bin\claude.exe"     # True: it is installed

$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
[Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')
Copied

Restart the terminal. A terminal inside VS Code or another editor takes its PATH from the editor, so quit and reopen the editor too. Installing only the VS Code extension does not give you a claude command: it bundles a private copy for its own panel and leaves PATH alone.

WinGet and npm

A WinGet install does not update itself. On November 23, 2026 WinGet’s package was at 2.1.330, level with npm’s latest tag. Run winget upgrade Anthropic.ClaudeCode, or set CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE=1 so Claude Code runs the upgrade for you; Windows locks the executable while Claude Code runs, so that upgrade can fail and hand you the command instead. The installer’s copy updates itself in the background. Channels, held versions and update errors are in how to update Claude Code.

npm install -g @anthropic-ai/claude-code also works and needs Node.js 22 or later, but in PowerShell it is the route that can meet running scripts is disabled on this system (fix below). The native installer avoids it.

Signing in

Run claude and follow the browser prompts; it needs a Pro, Max, Ultra, Team, Enterprise or Console account (or a cloud provider such as Amazon Bedrock), since the free claude.ai plan does not include Claude Code. If the browser shows a code instead of returning you to the terminal, paste it at the prompt. If pasting does nothing, try right-click or Shift+Insert in Windows Terminal, or run claude auth login, which reads the pasted code from standard input.

The shell Claude uses: PowerShell, Git Bash, or both

On native Windows, which shell Claude’s commands run in depends on whether Git for Windows is installed:

One catch in the second case: the PowerShell default arrives through a feature flag, and Claude Code skips fetching flags when DISABLE_TELEMETRY, DO_NOT_TRACK, CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC or CLAUDE_CODE_DISABLE_FEATURE_FLAGS is set. Commands then go through Git Bash unless you set CLAUDE_CODE_USE_POWERSHELL_TOOL=1 yourself. The default can also be missing in your first session after installing or upgrading, until Claude Code has fetched and saved its flags.

What to know about the PowerShell tool

When Git Bash is installed but not found

Without CLAUDE_CODE_GIT_BASH_PATH, Claude Code looks for bash.exe in C:\Program Files\Git and C:\Program Files (x86)\Git, then the bin\bash.exe of the Git installation whose git is on your PATH. It skips a git in the folder you launched from, or below it inside node_modules or a virtual-environment folder, so a project cannot plant one. For Git anywhere else, find it with where.exe git and set the path in %USERPROFILE%\.claude\settings.json, with each backslash doubled:

{
  "env": {
    "CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
  }
}
Copied

The file must be named bash.exe, sh.exe, bash or sh. Point it at Git for Windows’ git-bash.exe launcher, or at a path that does not exist, and Claude Code ignores the variable, auto-detects as if it were unset, and logs a warning you see only with --debug.

Permission rules and hooks see two shells

A Bash rule does not restrict the PowerShell tool, so on Windows with Git Bash installed, any Bash deny rule, even a narrow one such as Bash(git push *), turns PowerShell off for the session. A deny rule on the whole Bash tool then leaves Claude with no shell; a -p run with text output warns about that on stderr:

Denying Bash also turns off the PowerShell tool, so Claude has neither. To use PowerShell, set CLAUDE_CODE_USE_POWERSHELL_TOOL=1.
Copied

To keep PowerShell, set that variable or add a matching PowerShell deny rule such as PowerShell(git push *). PowerShell rules match case-insensitively and through aliases, so PowerShell(Get-ChildItem *) also covers gci, ls and dir. A hook that inspects shell commands should match Bash|PowerShell: one matching only Bash never fires for PowerShell commands. The hooks guide covers the rest.

If shell commands feel slow, check that you are on the current release. Per the changelog, 2.1.326 made a session’s first Bash command about a second faster, 2.1.327 made PowerShell commands up to about half a second faster each, and 2.1.330 fixed Bash staying slow for the rest of a session after Git Bash took 10 to 60 seconds to start, on machines with no custom start-up files.

Install in WSL 2

If WSL is not set up yet, wsl --install in PowerShell run as administrator, then a restart, sets it up with Ubuntu on WSL 2; the steps and the BIOS trap are in how to install WSL2. Then open the distribution and use the Linux installer. Claude is installed and started inside the WSL terminal, not from PowerShell or CMD, and needs no Git for Windows:

curl -fsSL https://claude.ai/install.sh | bash
claude --version
Copied

From there it is a Linux install: the PATH note after installing, the apt repository and the update channels are in Claude Code on Linux. The WSL-specific parts:

Where settings, sign-in and history live

On Windows, every ~/.claude path in Anthropic’s docs means %USERPROFILE%\.claude. Inside WSL, ~ is the Linux home.

WhatNative WindowsWSL
The program (installer’s copy)
%USERPROFILE%\.local\bin\claude.exe~/.local/bin/claude
Your settings
%USERPROFILE%\.claude\settings.json~/.claude/settings.json
Account, MCP servers, project state
%USERPROFILE%\.claude.json~/.claude.json
Sign-in
%USERPROFILE%\.claude\.credentials.json~/.claude/.credentials.json
Session history, auto memory
%USERPROFILE%\.claude\projects~/.claude/projects
Your organization’s policy
C:\Program Files\ClaudeCode\managed-settings.json/etc/claude-code/managed-settings.json

The sign-in is a file on Windows, as on Linux, not an encrypted store like the macOS Keychain. Per the authentication docs, it inherits the access controls of your profile folder, which limit it to your account by default. It holds a live login, so keep it out of repositories and shared backups. CLAUDE_CONFIG_DIR moves your settings, history, plugins and the sign-in to another folder. The managed settings file is read from C:\Program Files\ClaudeCode\; Claude Code does not read the legacy C:\ProgramData\ClaudeCode\managed-settings.json.

What else differs from macOS and Linux

Install and start-up errors on Windows

All but the last two are on Anthropic’s install troubleshooting page with their causes; those two come from its error reference and its changelog.

Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\downloads"
irm https://claude.ai/install.ps1 | iex
Copied
Get-ChildItem "$env:USERPROFILE\.local\bin\claude.exe.old.*" | Sort-Object Name | Select-Object -Last 1 | Rename-Item -NewName claude.exe
Copied

Uninstall

For the installer’s copy, in PowerShell, or with WinGet if that is how you installed it:

Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force
Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force

winget uninstall Anthropic.ClaudeCode
Copied

Settings, the sign-in and session history stay behind in %USERPROFILE%\.claude and %USERPROFILE%\.claude.json. Remove those as well only if you want all of it gone, and uninstall the VS Code extension, the JetBrains plugin and the desktop app first, since each writes to the same folder and recreates it. A copy inside WSL is removed from the WSL terminal, as on any Linux machine.

Run Claude Code on an always-on developer pod.

A developer pod is a permanent cloud computer (VPS), set up and secured for you, with your pick of Claude Code, Codex, OpenCode, Pi, Hermes and OpenClaw installed. Run more agents at once than your laptop can hold, and keep them working when it’s closed. From $24 a month, built in about ten minutes.