Claude Code on Windows? For a long time, the answer was: Only with WSL2.
That information is outdated. Since late 2025, Claude Code runs natively on Windows. No WSL2, no Linux, no workarounds. Installation takes less than 2 minutes.
I use Claude Code daily myself (on macOS), but I have also tested it on multiple Windows machines. In this guide, I will walk you through both paths: the native installation (the right choice for most users) and the WSL2 installation (for those who need sandboxing or full Linux compatibility).
- Claude Code runs natively on Windows since late 2025 (PowerShell, WinGet, or installer)
- WSL2 is only needed for sandboxing or Linux compatibility
- Important with WSL2: Always work in the Linux file system, never in /mnt/c/ (9x faster)
Does Claude Code Work on Windows?
Short answer: Yes.
Since late 2025, Anthropic offers a native Windows installer. You do not need WSL2 or a Linux distribution. A single command in PowerShell is all it takes.
Before that, things were different. Claude Code only ran on macOS and Linux. Windows users had to take the detour through WSL2 (the Windows Subsystem for Linux, a Linux environment integrated into Windows). It worked, but it was cumbersome.
So you have two options:
- Native installation (recommended for about 80% of users)
- Installation via WSL2 (for sandboxing and Linux compatibility)
Let's figure out which path is right for you.
Native vs. WSL2: Which Path Should You Choose?
The native installation is the better choice for the vast majority of users. It is faster, simpler, and perfectly sufficient for everyday work.
However:
There is an important difference that hardly anyone mentions. Sandboxing (isolating Claude Code at the OS level so it can only access specific files and network resources) currently works only on macOS and Linux. And therefore also on WSL2. But not on native Windows.
If you work with sensitive projects or do not want to give Claude Code unrestricted access to your system, WSL2 is the safer path.
Here is an overview:
Criterion | Native | WSL2 |
|---|---|---|
| Setup effort | About 2 minutes | 15 to 20 minutes |
| Performance | Good | Good (in Linux file system) |
| Sandboxing (OS-level isolation) | Not available | Yes |
| Linux script compatibility | Limited | Full |
| VS Code integration | Direct (extension) | Remote-WSL extension |
| Best for | Everyday work, web dev, standard projects | Sensitive projects, Linux workflows |
My recommendation: Start with the native installation. If you need sandboxing or Linux compatibility later, you can always add WSL2. Both can exist side by side.
Native Installation on Windows (Recommended)
The native installation is straightforward. You need two things:
- Windows 10 (version 1903 or newer) or Windows 11
- Node.js 18 or newer
If you are not sure whether Node.js is installed, open PowerShell and type the following command:
node --versionIf a version number appears (e.g. v20.11.0), you are good to go. If not, download Node.js from nodejs.org and install the LTS version.
3.1 Option A: Installation via PowerShell (Fastest Way)
Open PowerShell and run this command:
irm https://claude.ai/install.ps1 | iexThat is it. The command downloads the installer and runs it directly. After a few seconds, Claude Code is ready to use.
3.2 Option B: Installation via WinGet
If you use WinGet (the Windows package manager), it is just as easy:
winget install Anthropic.ClaudeCodeWinGet handles the rest. The advantage: future updates can be done with winget upgrade Anthropic.ClaudeCode.
3.3 Option C: Download the Installer from claude.ai
If you prefer a traditional installer, go to claude.ai/download and download the Windows version. Double-click, done.
3.4 Starting and Authenticating Claude Code
After installation, open a new terminal (PowerShell or CMD) and type:
claudeClaude Code starts and asks you to authenticate. You have two options:
- Claude Pro subscription: Claude Code uses your existing Claude account ($20/month, simplest option)
- API key: For usage-based billing (useful for intensive or professional use)
Follow the instructions in the terminal. After authentication, you can start working right away.
Done!
Installation via WSL2 (for Sandboxing and Linux Workflows)
This path takes a bit more effort, but it is worth it in certain scenarios:
- You work with sensitive projects and want to isolate Claude Code (sandboxing)
- Your project uses Linux-specific shell scripts or tools
- You work in a team that relies on Linux environments
Plan about 15 to 20 minutes for the initial setup.
4.1 Enable WSL2
Open PowerShell as Administrator (right-click the PowerShell icon, then select "Run as administrator") and run this command:
wsl --installWindows installs WSL2 and Ubuntu as the default distribution. This can take a few minutes. Afterwards, you will be prompted to restart your computer.
4.2 Set Up Ubuntu
After the restart, Ubuntu opens automatically (or you launch it from the Start menu). On the first start, you create a username and password.
Then update the system:
sudo apt update && sudo apt upgrade -y4.3 Install Node.js (via nvm)
I recommend installing via nvm (Node Version Manager). This lets you easily switch between Node.js versions later.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bashClose the terminal and reopen it. Then install the current LTS version:
nvm install --ltsVerify the installation:
node --version4.4 Install Claude Code
Now install Claude Code globally via npm:
npm install -g @anthropic-ai/claude-codeAnd start it:
claudeAuthentication works the same as with the native installation. You are redirected to a URL, sign in, and Claude Code is ready to use.
That is it!
Connecting VS Code with Claude Code on Windows
VS Code is the IDE that works best with Claude Code. The integration differs depending on whether you use the native or WSL2 installation.
5.1 Native Installation + VS Code
Setup is very simple:
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Claude Code"
- Install the official extension from Anthropic
Done. You can now use Claude Code directly from VS Code without switching between windows.
5.2 WSL2 Installation + VS Code
With WSL2, you need one additional step:
- Install the "WSL" extension (by Microsoft) in VS Code
- Open VS Code with the command
code .from your WSL2 terminal - VS Code automatically connects to the WSL2 environment
- Claude Code then runs inside WSL2 while you use VS Code as usual on Windows
Common Problems and Solutions
Do not worry if something does not work right away. Here are the most common issues and how to fix them.
6.1 WSL2 Does Not Start ("Virtualization not enabled")
The problem:
WSL2 requires hardware-level virtualization. On many machines, this feature is disabled in the BIOS by default.
The solution:
Restart your computer and enter the BIOS (usually via F2, F10, or Delete during boot). Look for "Intel VT-x" or "AMD-V" and enable the option. Save, restart, done.
6.2 Node.js Version Too Old
Claude Code requires at least Node.js 18. If you have an older version:
nvm install --lts
nvm use --ltsIf you do not use nvm, uninstall the old version and download the current LTS from nodejs.org.
6.3 Permission Error (EACCES) on npm install
A classic on Linux and WSL2. npm tries to install globally but does not have permission.
The solution:
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrcAfter that, npm install -g works without sudo.
6.4 Windows Defender Blocks Claude Code
Windows Defender can incorrectly flag Claude Code as a threat. In that case, add an exception:
- Open Windows Security
- Go to "Virus & threat protection"
- Click "Manage settings"
- Scroll to "Exclusions" and add the Claude Code installation path
6.5 Network Issues Behind a Corporate Proxy
If you work in a corporate network with a proxy, WSL2 needs to know the proxy settings. Add the following lines to your ~/.bashrc (replace the URL with your proxy):
export http_proxy=http://proxy.company.com:8080
export https_proxy=http://proxy.company.com:8080For the native installation on Windows, Claude Code typically picks up the system proxy settings automatically.
6.6 Claude Code Is Extremely Slow (WSL2)
This is the most common performance trap with WSL2. And the fix is simple.
The problem:
You are working in /mnt/c/Users/YourName/. That is the Windows file system, connected through a slow bridge. The native Linux file system is up to 9x faster.
The solution:
Move your project to your home directory inside WSL2:
mkdir -p ~/projects
cp -r /mnt/c/Users/YourName/my-project ~/projects/
cd ~/projects/my-projectFrom now on, always work in ~/projects/. The speed difference is enormous.
Performance Tips for Windows
A few things that will noticeably improve your experience with Claude Code on Windows.
7.1 Use Windows Terminal Instead of CMD or PowerShell
If you are not using it already: Windows Terminal is the better choice. It supports tabs, can manage PowerShell and WSL2 in a single window, and looks significantly better.
7.2 Limit WSL2 Resources (Optional)
WSL2 can grab a lot of RAM by default. If your system only has 8 or 16 GB, it is worth capping that. Create a file at %USERPROFILE%\.wslconfig with the following content:
[wsl2]
memory=4GB
processors=2Adjust the values to match your system. After saving, restart WSL2 with wsl --shutdown and reopen it.
7.3 Set Up CLAUDE.md
Regardless of whether you work natively or via WSL2: Create a CLAUDE.md file in your project directory. In it, describe your project, conventions, and important commands. Claude Code reads this file automatically and works much more effectively as a result.
What exactly belongs in the CLAUDE.md and how to set it up optimally is covered in detail in the Claude Code guide.
7.4 Know the Essential Commands
For getting started, a few commands are enough:
claudestarts Claude Code in the current directoryclaude "Your task"starts directly with a specific prompt/helpshows all available commands/compactcompresses the context (saves tokens)
A complete overview of all commands can be found in our Claude Code command reference.






