Claude Code Windows install PowerShell WinGet WSL 2026

Claude Code on Windows 2026: Native Install Guide (No WSL Required)

The Prompt Shelf ·

Claude Code runs natively on Windows. No WSL, no Linux container, no compatibility shim. If you’ve been putting off trying Claude Code because you assumed it only works on Mac or Linux, that assumption is now wrong.

This guide covers the three installation methods, how Windows-specific tooling (PowerShell vs Bash) works, and when WSL still makes sense over native Windows.


System Requirements

Before installing, confirm your setup meets these minimums:

  • OS: Windows 10 version 1809 or later, or Windows Server 2019+
  • RAM: 4 GB minimum
  • Architecture: x64 or ARM64
  • Shell: PowerShell or CMD (either works)
  • Network: Internet connection required for auth and API calls

No Node.js required for the native installer. The binary is self-contained.


Installation Methods

The native installer is the fastest path and the only one that auto-updates in the background.

PowerShell:

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

CMD:

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

If you see The token '&&' is not a valid statement separator, you’re in PowerShell, not CMD. Switch to the PowerShell command above. If you see 'irm' is not recognized, you’re in CMD — use the CMD version.

After installation, launch from any terminal:

claude

Native installs update automatically in the background. You get the latest version without running any upgrade command.

Option 2: WinGet

If you manage software with WinGet, Claude Code is available in the package registry:

winget install Anthropic.ClaudeCode

To upgrade later:

winget upgrade Anthropic.ClaudeCode

WinGet installs do not auto-update. Set a reminder to run the upgrade command occasionally, or enable the auto-update setting after install:

Add to your settings.json at %USERPROFILE%\.claude\settings.json:

{
  "env": {
    "CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE": "1"
  }
}

This makes Claude Code run the WinGet upgrade in the background when a new version is available.

Option 3: npm

If you already have Node.js 18+ installed:

npm install -g @anthropic-ai/claude-code

Supports both win32-x64 and win32-arm64. The npm package pulls in the same native binary as the standalone installer.

To upgrade:

npm install -g @anthropic-ai/claude-code@latest

Do not use npm update -g — it respects the semver range from the original install and may not pull the actual latest release.


Verify the Installation

After installing, confirm it worked:

claude --version

For a deeper check of your configuration:

claude doctor

claude doctor shows the last auto-update attempt, your auth status, and any configuration warnings.


Authenticate

Run claude and follow the browser prompts to log in. A Claude Pro, Max, Team, Enterprise, or Console account is required. The free plan does not include Claude Code access.


The Bash vs PowerShell Tool Question

This is the part most Windows users don’t realize matters: how Claude Code runs shell commands on Windows depends on whether Git for Windows is installed.

  • Without Git for Windows → Claude Code uses the PowerShell tool to execute commands
  • With Git for Windows → Claude Code uses the Bash tool (via Git Bash)

The PowerShell tool is a solid option and keeps improving, but the Bash tool has broader compatibility with Claude Code workflows — most examples in the docs and community assume Unix-style shell commands.

Install Git for Windows from git-scm.com/downloads/win to get Bash support.

If Claude Code can’t find Git Bash after installation, set the path manually in your settings:

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

To explicitly force the PowerShell tool (useful if you prefer it or want to test it):

{
  "env": {
    "CLAUDE_CODE_USE_POWERSHELL_TOOL": "1"
  }
}

Set to "0" to opt out if it’s rolling out automatically in your version.


Native Windows vs WSL: When to Use Which

Both options work. The choice depends on where your code lives and what tooling you need.

Native WindowsWSL 2WSL 1
RequiresNothing (Git for Windows optional)WSL 2 enabledWSL 1 enabled
SandboxingNot supportedSupportedNot supported
Best forWindows-native projects, toolsLinux toolchains, sandboxed executionWSL 2 unavailable

Use native Windows when:

  • Your project uses Windows-native tools (.NET, Visual Studio, PowerShell scripts)
  • You want the simplest setup with no extra dependencies
  • Sandboxed command execution isn’t a concern for your workflow

Use WSL 2 when:

  • Your project requires Linux toolchains (make, docker, specific Linux packages)
  • You want Claude Code’s sandboxing feature for safer command execution
  • You’re working on code that’ll deploy to Linux environments

For WSL, install Claude Code inside the WSL distribution, not from PowerShell. Launch it from your WSL terminal:

# Inside WSL terminal
curl -fsSL https://claude.ai/install.sh | bash
claude

Windows-Specific Troubleshooting

OneDrive sync conflicts

If your project is inside a OneDrive-synced folder, you may see:

EEXIST: file already exists

This happens when OneDrive sets the read-only attribute on session directories. Claude Code handles this since v2.1.163, but if you’re on an older version, move the project outside OneDrive or upgrade.

Permission rules not matching paths

Windows path separators (\) and UNC paths (\\server\share) weren’t matched by permission rules in older versions. This was fixed in v2.1.163. Upgrade if you’re seeing permission rule bypasses on Windows-style paths.

Shift + non-ASCII characters dropped

Terminals using the Kitty keyboard protocol (some Windows terminals) were dropping Shift+äÄ inputs. Fixed in v2.1.166.

PowerShell validation hanging

On some Windows setups, killed processes holding output pipes caused PowerShell command validation to hang. Fixed in v2.1.166.

The command not found error after install

Restart your terminal. The installer adds Claude Code to %USERPROFILE%\.local\bin, which needs a fresh shell session to appear in PATH. If it still fails after restart, run claude doctor to see what the installer detected.


Keeping Claude Code Updated

Native install: updates automatically. No action needed.

WinGet: run winget upgrade Anthropic.ClaudeCode periodically, or set CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE=1 as shown above.

npm: run npm install -g @anthropic-ai/claude-code@latest

To update manually regardless of install method:

claude update

To see the current version and update status:

claude doctor

Uninstalling

Native install:

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

npm:

npm uninstall -g @anthropic-ai/claude-code

To also remove configuration and session history:

Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force
Remove-Item -Path "$env:USERPROFILE\.claude.json" -Force

Desktop App Alternative

If you’d rather skip the terminal setup entirely, the Claude Code desktop app provides the same capabilities through a GUI. Download the Windows version from claude.com/download.

The desktop app and CLI can coexist — they share the same ~/.claude configuration directory.


Summary

Claude Code on Windows works without WSL. The native installer is the fastest path: one PowerShell command, auto-updates, no dependencies beyond the binary itself. Add Git for Windows if you want Bash tool support instead of PowerShell. Use WSL 2 if your project requires Linux toolchains or you need sandboxed execution.

The Windows-specific rough edges — OneDrive conflicts, path separator matching, keyboard input issues — are all fixed in the current release. Running claude doctor after install will surface any remaining configuration problems.

Related Articles

Explore the collection

Browse all AI coding rules — CLAUDE.md, .cursorrules, AGENTS.md, and more.

Browse Rules