I had to install nodejs :D
sudo apt update
sudo apt install nodejs npm -y
Everything works fine now, you can also install GitHub, it is optional tho.
Answer from Don Feto on Stack OverflowUnable to install Claude code in Windows with WSL - Stack Overflow
How to use Claude Code in Vs Code in Windows via WSL
Claude Code is now working natively on Windows โ and no oneโs talking about it?! ๐ณ๐ฅ
Claude Code's new native installer is now available!
Videos
Step 1: Open cmd
Open cmd as administrator
Step 2: Set NPM configuration, telling npm to ignore executing scripts in packages during installation (e.g., preinstall, postinstall, etc.)
setx NPM_CONFIG_IGNORE_SCRIPTS true
$env:NPM_CONFIG_IGNORE_SCRIPTS = โtrueโ
Step 3: Configure the SHELL environment variable
setx SHELL "C:\Program Files\Git\bin\bash.exe"
Step 4: Install Claude Code
npm install -g @anthropic-ai/claude-code
Step 5: Add to Environment Variables
Add this line to your environment variables:
C:\Users\y.xie\.npm-global
Step 6: Restart the development environment
Restart CMD or your IDE (e.g., VS Code, IntelliJ IDEA), then log in to your Claude Code account or configure the API directly within the application to start using it.
Supplementary Notes
Ensure Git for Windows is installed, with the path being
C:\Program Files\Git\bin\bash.exe.If the Git installation path is different, please adjust the SHELL environment variable path accordingly.
The path
C:\Users\y.xie\.npm-globalshould also be added based on your actual path.It is recommended to set these variables permanently to avoid having to reconfigure after each restart.
Later, if you want to uninstall and revert the changes from Step Two and Step Three, just execute
setx NPM_CONFIG_IGNORE_SCRIPTS falseandsetx SHELL "".
What a title. Anyways, figured I'd make a quick little guide on how to do this.
Prerequisites:
VS Code
Git repository (not an actual requirement, just how I did it with my limited bash knowledge)
Steps
1. Open up PowerShell and install WSL with:
cmd wsl --install
2. Set Ubuntu as default (important!):
cmd wsl --set-default Ubuntu
3. Open a WSL terminal
Tip: check the upper left dropdown menu in Windows Terminal that will show various terminals available
4. Install Claude Code in the WSL terminal (if you have issues, please refer to Anthropic's guide):
bash npx u/anthropic-ai/claude-code
5. Make a directory for your projects:
bash mkdir coolProjects && cd coolProjects
6. Clone your project (optional):
bash git clone https://github.com/yourrepo.git
7. Open VS Code
8. Install the official WSL extension
9. Press F1
10. Type "WSL"
IMPORTANT
11. Select "WSL: Connect to WSL using Distro"
Choose Ubuntu.
From here you can now open a folder within VS Code.
How do you know it worked? Check the bottom left corner of VS Code - it should say "WSL: Ubuntu" and your Claude Code extension should be enabled!
Troubleshooting
If you get Alpine Linux errors or "libstdc++ required" messages: This usually happens if you have Docker Desktop installed and it became your default WSL distribution instead of Ubuntu. Run wsl --list --verbose to check, and if docker-desktop-data has an asterisk (*), run wsl --set-default Ubuntu to fix it. That's why step 2 is so important!
Hope this is helpful!
Wait hold upโฆ
Did Claude just silently drop native Windows support for Claude Code?
I swear I spent hours earlier messing with WSL, Ubuntu, terminal configsโฆ just to get Claude running.
But today? Just booted up the project on Windows like a regular dev โ and boom, Claude Code is working straight out of the box. No Linux layer, no weird hacks, no tears.
No announcement. No tweet. No "hey Windows folks, we got you now." Just casually fixing one of the biggest pain points for Windows users like itโs no big deal.
๐ป Windows users, rise up. ๐ Thank you Claude team (Cursor/Anthropic/whoever made this happen). ๐ซก Respect for shipping useful stuff quietly while the rest of AI Twitter argues over prompt engineering.
If you've been holding off on Claude Code because you're on Windows โ nowโs the time.
It's simpler, more stable, and no longer requires Node.js. This is the new recommended way to install it on macOS, Linux, and Windows.
Reported by NearExplains