Back to the Claude Code profile →

Setup and troubleshooting guide

Claude Code on Windows: setup and troubleshooting

Install Claude Code on Windows: native or WSL 2, PowerShell / CMD / WinGet commands, whether you need Git for Windows, fixes for 'claude' is not recognized and other errors, sign-in and permission modes.

Documentation checked

Checked against Anthropic's official Claude Code documentation on 2026-10-20. FollowAgents has not yet run a Windows install test on a current Claude Code release; it changes quickly, so the linked official pages win wherever they differ.

On Windows, the usual trouble isn't Claude Code itself but three things: native Windows or WSL, pasting the command into the wrong shell (PowerShell and CMD need different commands), and 'claude' is not recognized after install. This guide takes them in that order, then covers plans, permissions and uninstalling.

Still comparing tools? See Claude Code's features and review or Claude Code vs Codex.

First: can your plan and PC run it?

  • Plan: the docs require a Pro, Max, Team, Enterprise or Console (API) account — the free claude.ai plan does not include Claude Code. Amazon Bedrock, Google Cloud and Microsoft Foundry also work.
  • System: Windows 10 1809+ or Windows Server 2019+, x64 or ARM64, 4 GB+ RAM. 32-bit Windows is not supported.
  • Location: use from an Anthropic supported country or region.

See the official setup and system requirements.

Step 1: Native Windows or WSL

Option Requires Sandboxing When to use
Native Windows Nothing; Git for Windows is optional Not supported Windows-native projects and tools
WSL 2 WSL 2 enabled Supported Linux toolchains, or sandboxed command execution
WSL 1 WSL 1 enabled Not supported Only if WSL 2 is unavailable

In short: Windows-native projects (.NET, desktop apps) → native; projects that already live in Linux, or wanting commands sandboxed → WSL 2.

Step 2: Install

Native Windows: no Administrator rights needed. Check which shell you're in first — a PS C:\Users\you> prompt is PowerShell; without PS it's 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

Or WinGet (no auto-update; run winget upgrade Anthropic.ClaudeCode periodically):

winget install Anthropic.ClaudeCode

The installer shows no progress. When it finishes, open a new terminal and run claude --version; a version number means it worked.

WSL: open your WSL distribution, run the Linux installer there, and launch claude from the WSL terminal — not from PowerShell or CMD:

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

Native installs update themselves in the background; claude update updates now and claude doctor runs a full health check.

Step 3: Do you need Git for Windows?

On native Windows, Git for Windows is optional:

  • Without it, Claude Code runs shell commands through PowerShell.
  • With it, Claude Code uses Git Bash, and the PowerShell tool stays available too. Many projects' scripts and docs assume Bash, so it usually helps.

If Git is installed but not found, locate it with where.exe git and point settings.json at its bash.exe:

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

WSL doesn't need Git for Windows.

Common errors

From the official install troubleshooting docs:

You see Cause Fix
'irm' is not recognized PowerShell command in CMD Switch to PowerShell, or use the CMD command above
The token '&&' is not a valid statement separator CMD command in PowerShell Use the PowerShell installer above
A parameter cannot be found that matches parameter name 'fsSL' The macOS/Linux curl ... bash command in PowerShell Use the PowerShell installer
'claude' is not recognized %USERPROFILE%\.local\bin isn't on PATH, or the terminal is the old one Open a new terminal; if it persists, add that folder to your user PATH (below)
'claude' is not recognized right after an update claude.exe went missing during the update Restore the backup (below) or rerun the installer
The process cannot access the file ... being used by another process Another installer window or antivirus holds the download folder Close other installers, delete %USERPROFILE%\.claude\downloads, reinstall
running scripts is disabled on this system npm install; PowerShell's execution policy blocks the .ps1 launchers Use the PowerShell installer, or Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
claude opens the desktop app An older Claude Desktop claims the claude command Update Claude Desktop
32-bit Windows error Possibly Windows PowerShell (x86) Use PowerShell without "x86"; a truly 32-bit OS is unsupported
Exec format error in WSL You're on WSL 1 Convert with wsl --set-version <DistroName> 2 in PowerShell

Add the install folder to your user PATH (PowerShell, then reopen the terminal):

[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", "User") + ";$env:USERPROFILE\.local\bin", "User")

Restore claude.exe after an update removed it:

Get-ChildItem "$env:USERPROFILE\.local\bin\claude.exe.old.*" | Sort-Object Name | Select-Object -Last 1 | Rename-Item -NewName claude.exe

Step 4: Sign in

Run claude in a project and follow the browser prompt. If no browser opens, press c to copy the login URL and paste it into a browser yourself.

In WSL 2 the browser often fails to open, or can't hand the login back:

  • Point WSL at a Windows browser: export BROWSER="/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", then run claude.
  • If the browser shows a login code, paste it back into the terminal — in Windows Terminal try right-click or Shift+Insert.
  • Otherwise use claude auth login.

For unclear login failures, run /logout, close Claude Code and sign in again; that fixes most cases.

Step 5: First task and permissions

Run claude in a Git project and start with a question that changes nothing. Permission modes decide what needs your approval; Shift+Tab cycles them and the status bar shows the current one. Per the official permission modes docs:

Mode Runs without asking Best for
default (manual) Reads only Approving every step
acceptEdits Reads, file edits and common file commands Iterating on code you review
plan Reads and exploration; edits wait for an approved plan Understanding code before changing it
auto Nearly everything, with background classifier checks Long tasks, fewer prompts

Note that recent versions start interactive sessions in auto. To be more conservative, start with:

claude --permission-mode plan

--dangerously-skip-permissions (bypassPermissions) skips every check; the docs reserve it for isolated containers or VMs. Native Windows has no sandbox, so it is an even worse idea there.

Uninstall

Native install (PowerShell):

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

WinGet: winget uninstall Anthropic.ClaudeCode. Settings, MCP configuration and session history live in %USERPROFILE%\.claude and %USERPROFILE%\.claude.json; the VS Code and JetBrains extensions and the desktop app write there too, so uninstall them first for a clean removal.

FAQ

Is Claude Code free? The free claude.ai plan doesn't include it; Pro is the minimum, or a Console API key billed per use. See the official setup docs.

Can I avoid the terminal? Yes, there is a Windows desktop app that runs Claude Code without a terminal; the download link is in the official setup docs.

Can I use other models? Officially it supports Anthropic accounts plus Bedrock, Google Cloud and Microsoft Foundry. Some people switch providers with CC Switch, at their own risk with third-party relays; for a vendor-neutral coding agent see the OpenCode guide.

Claude Code or Codex? Mostly about the plan you already have and the models you want. See Claude Code vs Codex and the AI coding agents ranking.