How to Install Claude Code on Windows (WSL & Git Bash)
Step-by-step guide to setting up Claude Code on Windows using WSL, Git Bash, PowerShell, and WinGet. Includes troubleshooting tips.
Windows Requirements
- Windows 10 version 1809+ or Windows Server 2019+
- 4 GB RAM minimum
- Active internet connection
- One of: WSL, Git Bash, or PowerShell
Choose Your Setup Method
Claude Code on Windows works through two primary approaches:
- WSL (Recommended) — Run Claude Code inside Windows Subsystem for Linux
- Native Windows with Git Bash — Run Claude Code directly on Windows
Option 1: WSL Setup (Recommended)
WSL gives you the best Claude Code experience on Windows. Both WSL 1 and WSL 2 are supported, but WSL 2 is recommended as it supports Bash tool sandboxing for enhanced security.
Step 1: Install WSL
If you don’t have WSL installed yet:
wsl --install
This installs WSL 2 with Ubuntu by default. Restart your computer after installation.
Step 2: Install Claude Code in WSL
Open your WSL terminal (Ubuntu) and run:
curl -fsSL https://claude.ai/install.sh | bash
Step 3: Verify
claude --version
claude doctor
That’s it! Claude Code runs natively inside your WSL environment with full Linux compatibility.
Option 2: Native Windows with Git Bash
Step 1: Install Git for Windows
Download and install Git for Windows which includes Git Bash.
Step 2: Install Claude Code
PowerShell:
irm https://claude.ai/install.ps1 | iex
CMD:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Step 3: Configure Git Bash Path (if needed)
For portable Git installations, specify the path to your bash.exe:
$env:CLAUDE_CODE_GIT_BASH_PATH = "C:\Program Files\Git\bin\bash.exe"
Option 3: WinGet
winget install Anthropic.ClaudeCode
WinGet installations don’t auto-update. Run winget upgrade Anthropic.ClaudeCode periodically.
Authentication
Launch Claude Code and authenticate:
claude
You’ll be guided through the OAuth process. Options include:
- Claude Pro/Max Plan: Subscribe at claude.ai/pricing for unified access
- Anthropic Console: Set up at console.anthropic.com with active billing
Windows-Specific Tips
Use Windows Terminal
Windows Terminal provides the best experience for Claude Code on Windows:
- Supports multiple tabs (WSL, PowerShell, CMD)
- Better color rendering for terminal output
- GPU-accelerated text rendering
- Customizable themes and fonts
Recommended Terminal Font
Install JetBrains Mono or Cascadia Code for the best code rendering experience.
File System Performance in WSL
For best performance, keep your project files inside the WSL file system (/home/username/projects/) rather than on the Windows mount (/mnt/c/).
# Good - fast
cd ~/projects/my-app
claude
# Slow - crosses file system boundary
cd /mnt/c/Users/me/projects/my-app
claude
Troubleshooting
”command not found” in WSL
Ensure the PATH includes the install location:
export PATH="$HOME/.local/bin:$PATH"
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
PowerShell Execution Policy
If the PowerShell installer is blocked:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Firewall Issues
If Claude Code can’t connect, ensure your firewall allows outbound HTTPS traffic to claude.ai and anthropic.com domains.
Updating & Uninstalling
Update
claude update
Or for WinGet: winget upgrade Anthropic.ClaudeCode
Uninstall
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
Next Steps
- Complete Installation Guide — All platforms and methods
- Claude Code for Beginners — Start your first session
- Claude Code Tips and Tricks — Become a power user
- Visit Claude.ai to get started