Claude Code on Windows: The Complete Setup Guide
Install, configure, and operate Claude Code natively on Windows across PowerShell, Command Prompt, and WSL2.
~7 min read
A frequent question in developer forums is whether Claude Code requires macOS or a Linux machine. The answer is an emphatic no: Claude Code runs natively on Windows. However, Windows has distinct execution policies, path separators, and shell runtimes that can surprise new builders.
If you have encountered errors like "running scripts is disabled on this system" or wondered whether you should install in PowerShell vs Windows Subsystem for Linux (WSL2), this guide walks through the exact setup steps that work reliably.
PowerShell native vs WSL2: making the right choice
Before typing an installation command, choose the environment that matches your software stack:
- Native Windows (PowerShell): Choose this if you build .NET applications, Windows desktop software, or cross-platform Node and Python services using native Windows tools. You stay in your primary filesystem with zero virtualization overhead.
- WSL2 (Ubuntu): Choose this if your repository relies on bash scripts, Linux Makefiles, Docker daemon mounts, or POSIX-specific utilities. Running Claude Code inside WSL provides a true Linux environment with standard bash paths.
Installing via native PowerShell
The headline installation method for Windows is the native PowerShell script. It configures the binary and registers background auto-updates.
If you use Command Prompt (CMD) rather than PowerShell, run this batch install command instead:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdFixing execution policy and PATH errors
If PowerShell displays the error `File cannot be loaded because running scripts is disabled on this system`, do not panic. Windows restricts PowerShell script execution by default. Setting `Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned` allows local scripts and verified remote downloads to execute safely.
The installer writes the binary to `%LOCALAPPDATA%\Programs\ClaudeCode` or `%USERPROFILE%\.claude\bin`. If `claude --version` fails after opening a fresh terminal, inspect your Windows User Environment Variables and verify that the directory appears in your PATH list.
Path separators and cross-platform skills
Windows natively uses backslashes (`\`) for file paths, whereas Linux and macOS use forward slashes (`/`). A great feature of Claude Code is that it normalizes forward slashes across all operating systems.
In your SKILL.md and CLAUDE.md files, always write relative paths using forward slashes (such as `src/routes/user.ts` rather than `src\routes\user.ts`). Forward slashes work cleanly on Windows, macOS, and Linux, ensuring your skills remain completely portable across team members on different machines.
Setting the shell property in skills
Skills that execute bundled command-line scripts default to bash. On a native Windows install without Git Bash or WSL on your PATH, those commands fail. Claude Code allows you to specify PowerShell explicitly in the frontmatter of your skill:
---
name: win-test-runner
description: Use when running unit tests on Windows.
shell: powershell
---
# Windows test runner
Run the test suite using PowerShell:
! npm test -- --reporter=verboseCRLF line endings and git configuration
On Windows, Git often checks out files with CRLF (carriage return + line feed) endings. Some linters and testing tools fail when encountering CRLF endings. Run this command once in your terminal to keep line endings clean:
Get new guides in your inbox
One task, one guide, done fast. Practical Claude Code skills, zero noise.


