Advertise hereReach developers building with AI coding agents. →

Based on Anthropic’s official docs, checked

Claude Code on Windows: native, WSL and common errors

Claude Code runs natively on Windows 10 1809 or later and Windows Server 2019 or later, or inside WSL. The choice matters more than on other platforms: native Windows has no sandboxing, the shell Claude uses depends on whether Git for Windows is installed, and most install errors come from running the wrong command for your shell. This guide covers the choice, the setup and the fixes for common Windows errors, from Anthropic's setup and troubleshooting docs checked October 25, 2026. For the general macOS and Linux walkthrough, see our install guide.

  1. 1. Choose native Windows or WSL

    Native Windows needs nothing extra and suits Windows-native projects and tools, but sandboxing is not supported. WSL 2 supports sandboxed command execution and suits Linux toolchains. WSL 1 works when WSL 2 is unavailable, without sandboxing.

  2. 2. Native: install from PowerShell

    Open Windows PowerShell (not the x86 entry) and run the installer. You do not need to run as Administrator. The command shows no progress while it downloads.

    irm https://claude.ai/install.ps1 | iex
  3. 3. Native: or install from CMD

    In Command Prompt, use the CMD installer instead. Your prompt shows PS C:\ in PowerShell and C:\ without PS in CMD.

    curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
  4. 4. WSL: install inside the Linux shell

    Open your WSL distribution and run the Linux installer there. You install and launch claude inside the WSL terminal, not from PowerShell or CMD. WSL setups do not need Git for Windows.

    curl -fsSL https://claude.ai/install.sh | bash
  5. 5. Open a new terminal and verify

    Run claude --version in a new window. A working install prints a version number. On Windows the native installer places claude.exe in %USERPROFILE%\.local\bin.

    claude --version

Git Bash, PowerShell and which shell Claude uses

On native Windows, Git for Windows is optional but recommended. With it installed, Claude Code uses Git Bash for its Bash tool, which the Monitor tool also needs, and the PowerShell tool is available alongside (on by default for claude.ai and Console accounts). Without it, Claude Code runs shell commands through the PowerShell tool instead.

If Claude cannot find Git Bash, it looks in C:\Program Files\Git and C:\Program Files (x86)\Git, then at the git on your PATH. Set CLAUDE_CODE_GIT_BASH_PATH in settings.json to point at a specific bash.exe; run where.exe git in PowerShell to find your Git installation.

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

"claude is not recognized" after installing

The install folder is not on your PATH yet. In PowerShell, check the file exists with Test-Path "$env:USERPROFILE\.local\bin\claude.exe", then add the folder to your User PATH and open a new terminal. A terminal inside an editor takes its PATH from the editor, so quit and reopen the editor too.

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

Wrong command for your shell

"The token '&&' is not a valid statement separator" means you ran the CMD command in PowerShell. "'irm' is not recognized" means you ran the PowerShell command in CMD. "'bash' is not recognized" or "A parameter cannot be found that matches parameter name 'fsSL'" means you pasted the macOS and Linux command into Windows. Use the installer that matches your prompt.

Other Windows-only errors

"Claude Code does not support 32-bit Windows" usually means you opened Windows PowerShell (x86). Run [Environment]::Is64BitOperatingSystem; if it prints True, reopen plain Windows PowerShell. Claude Code requires a 64-bit operating system.

"The process cannot access the file ... being used by another process" means an earlier install or an antivirus scan still holds %USERPROFILE%\.claude\downloads. Close other installer windows, delete that folder and run the installer again.

If claude is not recognized right after an update, the update may have left only a backup named claude.exe.old. followed by a timestamp in %USERPROFILE%\.local\bin. Rename the newest backup to claude.exe, or reinstall.

WSL-specific problems

"cannot execute binary file: Exec format error" in WSL means you are on WSL 1 and hitting a known native-binary regression. The cleanest fix is converting the distribution with wsl --set-version <DistroName> 2.

With npm installs, a platform mismatch or "exec: node: not found" means WSL is picking up the Windows npm or Node.js. Run which npm and which node: paths under /mnt/c/ are Windows binaries. Install Node.js inside the distribution with its package manager or nvm.

Tips

Next steps

Verified MCP servers for Claude

→

Generate an MCP config for Claude

→

Claude Code hub

→

Claude Code vs OpenAI Codex: documented features compared

→

Cursor vs Claude Code: documented features compared

→

Claude Code vs GitHub Copilot: documented features compared

→

Google Antigravity vs Claude Code: documented features compared

→

How to add an MCP server to Codex

→

How to add an MCP server to Cursor

→

How to add an MCP server to GitHub Copilot in VS Code

→

How to add an MCP server to Google Antigravity

→

How to migrate from Gemini CLI to Antigravity CLI

→

Portable agent skills: one SKILL.md for every coding agent

→

Safe “always allow” rules for Claude Code and Codex CLI

→

GitHub Copilot CLI yolo mode: --allow-all and safer tool rules

→

Codex sandbox modes and approval policies explained

→

How to install Claude Code on macOS, Linux and Windows

→

How to install the OpenAI Codex CLI

→

Claude Code auto mode: what runs, what gets blocked, how to turn it off

→

Agent Skills moves to the Agentic AI Foundation: what changes

→

MCP security: the risks in MCP servers and how to lock them down

→

Claude Code in VS Code: install, shortcuts and CLI differences

→

What is AGENTS.md? The open instruction file for coding agents

→

Codex skills: create, install and use SKILL.md skills in Codex

→

GitHub Copilot CLI: install, sign in and start using it

→

Cursor Agent SDK: build, test and deploy agents as code

→

GPT-6.1 Terra in Codex and the API: setup, pricing and limits

→

MCP OAuth: connect a remote MCP server in Claude Code, Codex and Cursor

→

Codex config.toml: location, precedence and the settings to change

→

Codex on Windows: native sandbox setup, WSL and fixes

→

Antigravity CLI (agy): install, sign in, modes and commands

→

Google Antigravity on Windows: install, WSL, sandbox and fixes

→

GitHub Copilot coding agent (now cloud agent): how to use it

→

GitHub Copilot agent mode: how to use it in your IDE

→

Frequently asked questions

Yes. It runs natively on Windows 10 1809+ and Windows Server 2019+ (64-bit), or inside WSL 1 or WSL 2.

Sources