A comprehensive guide for installing and using Claude Code on Windows through WSL (Windows Subsystem for Linux).
If you just want to get Claude Code running on Windows:
- Install WSL:
wsl --install(in PowerShell as Admin) - Install Ubuntu:
wsl --install -d Ubuntu - Install Node.js:
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - - Install Claude Code:
sudo npm install -g @anthropic-ai/claude-code - Authenticate:
claude auth login(copy URL to browser)
This repository contains comprehensive guides for every aspect of Claude Code on Windows:
- Complete Installation Guide - Step-by-step installation process
- Quick Reference - Essential commands and shortcuts
- Troubleshooting Guide - Common issues and solutions
- Windows Setup Guide - Daily usage and configuration
- Security Best Practices - Keep your system safe
- Capabilities & Limitations - What Claude Code can and cannot do
- GitHub SSH Setup - Configure Git and SSH for GitHub
- WSL Git & GitHub Guide - Handle WSL-specific git issues and permissions
Never launch Claude Code from system directories:
# ❌ BAD - Severely limited capabilities
C:\Windows\system32> wsl claude
# ✅ GOOD - Full capabilities
C:\Users\YourName\Documents> wsl claude- Claude Code runs in Linux (WSL), not native Windows
- Windows files are accessible at
/mnt/c/in WSL - The command is
claude, notclaude-code - Browser authentication requires manual URL copy/paste
- Use
sudofor system operations in WSL
- Windows 10 version 2004+ or Windows 11
- Administrator access
- Internet connection
- Anthropic account with subscription
-
Enable WSL
# PowerShell (Admin) wsl --install
-
Install Ubuntu
wsl --install -d Ubuntu
-
Install Node.js (in WSL/Ubuntu)
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - sudo apt-get install -y nodejs -
Install Claude Code
sudo npm install -g @anthropic-ai/claude-code
-
Set up the
claudecommandsudo ln -s /usr/lib/node_modules/@anthropic-ai/claude-code/cli.js /usr/local/bin/claude
-
Authenticate
claude auth login # Copy the URL to your Windows browser
# From Windows (PowerShell/CMD)
cd C:\Users\%USERNAME%\Documents
wsl claude
# From within WSL
cd /mnt/c/Users/$USER/Documents
claudewsl --status # Check WSL status
wsl --list --verbose # List distributions
wsl --shutdown # Restart WSL
wsl # Enter default distributionCLAUDECODE_COMPLETE_WINDOWS_INSTALL_GUIDE/
├── README.md # This file
├── docs/
│ ├── INSTALLATION.md # Complete installation guide
│ ├── WINDOWS_SETUP.md # Windows-specific setup
│ ├── SECURITY.md # Security best practices
│ ├── QUICK_REFERENCE.md # Command reference
│ ├── CAPABILITIES.md # Capabilities & limitations
│ ├── TROUBLESHOOTING.md # Problem solving
│ └── GITHUB_SSH.md # GitHub integration
├── scripts/
│ ├── safe-launcher.bat # Windows batch launcher
│ └── setup-claude.sh # WSL setup script
└── LICENSE
Found an issue or have an improvement? Please:
- Fork this repository
- Create a feature branch
- Submit a pull request
Or open an issue to discuss changes.
This guide is provided under the MIT License. See LICENSE file for details.
- Anthropic team for creating Claude Code
- WSL team at Microsoft
- Community members who reported issues and solutions
Remember: The key to success with Claude Code on Windows is launching from the right directory. When in doubt:
cd C:\Users\%USERNAME%\Documents && wsl claudeHappy coding with Claude Code! 🎉