Claude Code on Windows runs via WSL2 (Windows Subsystem for Linux). The setup requires a few specific steps, but once configured properly, the experience is seamless.
Run multiple autonomous coding agents simultaneously with Verdent's isolated Git worktrees. Each agent tackles different components while maintaining full context awareness, eliminating manual debugging bottlenecks and accelerating feature delivery. Discover Verdent AI (Free Trial)
Prerequisites
Before installing Claude Code, you'll need:
- Windows 10 version 2004 or higher (or Windows 11)
- WSL2 installed and configured
- Node.js 18.0+ in your WSL environment
- Anthropic API key or Claude subscription
Step by Step Installation
1. Install WSL2
If you haven't already installed WSL2:
wsl --install
This installs WSL2 with Ubuntu by default. Restart your computer when prompted.
2. Set Up Your Linux Environment
Open your WSL terminal and update packages:
sudo apt update && sudo apt upgrade -y
3. Install Node.js
Install Node.js 18.0+ in your WSL environment:
# Download and run NodeSource setup script for LTS version
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
Verify the installation:
node --version
npm --version
4. Install Claude Code
Now install Claude Code globally:
npm install -g @anthropic-ai/claude-code
5. Configure Authentication
Set up your authentication method:
For API users:
claude config
For subscription users:
You'll authenticate through the browser when you first run claude.
VS Code Integration
Once Claude Code is installed, you can seamlessly integrate it with Visual Studio Code. This setup is incredibly productive for daily development.
- Open VS Code on Windows: Launch Visual Studio Code from your Windows desktop or start menu
- Install the WSL extension: Search for "WSL" in the Extensions panel and install the official Microsoft WSL extension
- Open your project in WSL: Use Ctrl+Shift+P, type "WSL: Open Folder in WSL" and select your project directory
- Access WSL terminal: Open the integrated terminal (Ctrl+`) which will automatically connect to your WSL environment
- Launch Claude Code: Run
claudein the integrated terminal to start your Claude Code session
This gives you the best of both worlds: familiar VS Code interface with Claude Code's powerful terminal capabilities.
Testing Your Installation
Create a simple test to verify everything works:
mkdir claude-test
cd claude-test
echo "# Test Project" > README.md
claude
If Claude Code starts successfully and can read your README.md file, you're all set!
Windows-Specific Features
Claude Code includes several Windows-optimized features for improved workflow integration:
Image Clipboard Support
Alt + V Shortcut (v1.0.93+) - Paste images directly from clipboard into your Claude Code session:
# Copy an image to clipboard (screenshots, copied images, etc.)
# Press Alt + V in Claude Code to paste directly
This streamlines image sharing and screenshot analysis workflows without requiring file management.
Path Format Handling
POSIX Path Format (v1.0.106+) - Windows path permissions now consistently use POSIX format for better cross-platform compatibility:
# Claude Code now uses POSIX format for Windows paths
Read(//c/Users/username/Documents/project/file.txt)
# Instead of traditional Windows format
# Read(C:\Users\username\Documents\project\file.txt)
This improves consistency when working with cross-platform projects and tools.
Benefits:
- Cross-Platform Compatibility - Consistent path handling across operating systems
- Tool Integration - Better compatibility with Linux-based development tools
- Script Portability - Easier sharing of configurations and scripts
Run multiple autonomous coding agents simultaneously with Verdent's isolated Git worktrees. Each agent tackles different components while maintaining full context awareness, eliminating manual debugging bottlenecks and accelerating feature delivery. Discover Verdent AI (Free Trial)
See Also: Installation Guide|Getting Started|Pricing
