How I Finally Installed Claude Code on Windows (A Step-by-Step Fix That Actually Works)
Walkthrough
If you like to watch the video, go to How to Install Claude Code terminal Windows
The Struggle Begins
I still remember the first time I tried to install Claude Code on Windows. It was supposed to be a quick setup — open a terminal, run a few commands, and start coding with Claude inside my project folder. But instead, I found myself knee-deep in error messages, permissions issues, and half-working installations that never seemed to connect properly.
At first, it was just a simple wsl --install command that failed. Then came the endless Ubuntu version conflicts, Node/npm version mismatches, and mysterious “command not found” messages. Every tutorial I read seemed to skip some step — they assumed things were already configured. It was like trying to follow a recipe where someone forgot to mention preheating the oven.
Why Installing Claude on Windows is So Tricky
Windows users often face an uphill battle when setting up developer tools. Unlike macOS or Linux, Windows doesn’t have native UNIX utilities, so we rely on WSL (Windows Subsystem for Linux) — a brilliant but sometimes finicky bridge between the two worlds. Add in differences between PowerShell, CMD, and Bash, and it’s no wonder people run into issues.
By the time I hit my fifth reinstall, I had completely broken WSL. Ubuntu wouldn’t start, Node refused to install, and npm kept throwing version conflicts. That’s when I decided to stop relying on random snippets online — and start clean. From scratch.
The Turning Point: Starting Fresh
I wiped my WSL environment and began again. Slowly, carefully, I documented each working step — no shortcuts, no skipped parts, just a clean, repeatable installation. After hours of testing and reboots, I finally built a setup process that worked perfectly every time. Now, I’m sharing it with you.
My Clean, Reliable Installation Guide for Claude Code on Windows
You can copy and paste these commands directly. Each step matters — follow them in order for a smooth installation.
Step-by-Step Instructions
Step 1: wsl --install
Step 2: Type powershell at the start menu
Step 3: Set-ExecutionPolicy -Scope CurrentUser Unrestricted
(restart)
Step 4: wsl --install -d Ubuntu-24.04
--Create Your Linux User Account--
sudo apt update
sudo apt full-upgrade -y
Step 5: cd ~ && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
Step 6: . "$HOME/.nvm/nvm.sh"
Step 7: nvm install 20
Step 8: sudo apt install python3 python3-pip -y
Step 9: sudo apt install git ripgrep -y
Step 10: mkdir -p ~/.npm-global
npm config set prefix ~/.npm-global
nvm use --delete-prefix v20.19.6 --silent
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
Step 11: npm install -g @anthropic-ai/claude-code
Step 12: cd ~/ && mkdir claude-projects && cd claude-projects && mkdir first-project && cd first-project
cd /mnt/c/Users/Admin/Documents/ && mkdir claude-projects && cd claude-projects && mkdir first-project && cd first-project
Final Step: Type 'claude'
Tips & Best Practices
- After closing PowerShell, type
wslto re-enter Linux. - For better file management, place your projects inside
/mnt/— this ensures smooth cross-platform access. - Example path:
cd /mnt/c/Users/your-username/Documents/
Final Thoughts
If you’ve ever struggled through endless installation errors and half-baked tutorials, I get it. This guide is for people like us — those who want a safe, reliable, and repeatable setup process that just works. No skipped steps, no assumptions, no confusion. Just a working Claude Code environment on Windows.
So go ahead — follow these steps, take your time, and enjoy the satisfaction of typing claude and watching it work flawlessly. You earned it.
Written by Halim — for every developer who’s ever yelled at their terminal and lived to tell the tale.
