Unable to install Claude code in Windows with WSL - Stack Overflow
how to run claude code on a windows 365 wsl ubuntu instance
[BUG] Claude Code freeze in WSL
MCP Server, Claude Code and WSL | Figma Forum
Videos
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!