Claude Code Windows Install Guide (2026): Fix "claude is not recognized as cmdlet"¶
For / Key Points
For: Windows users who installed Claude Code but PowerShell cannot find the claude command
Key Points:
- The first fix is terminal restart, then
%USERPROFILE%\.local\binPATH verification - Native Windows and WSL are both supported; WSL is no longer mandatory
- Git for Windows is recommended for Bash tool support, but it is not a hard requirement
Quick Answer¶
If PowerShell says claude : The term 'claude' is not recognized as the name of a cmdlet, do three things first: run the official PowerShell installer, close and reopen the terminal, then verify that %USERPROFILE%\.local\bin is in PATH. Claude Code now runs natively on Windows, so WSL is optional rather than required.
Looking for the cross-platform PATH fix?
This page focuses on Windows setup. For the all-OS claude not found / command not recognized checklist, use Fix "claude is not recognized as internal or external command".
Fresh install
Go straight to Installation Steps.
claudeis not recognizedJump to Troubleshooting for the PATH fix.
Need image paste on Windows
Skip to Clipboard Image Paste.
Claude Code released a native Windows version in 2025 and continues to receive frequent updates. While WSL (Windows Subsystem for Linux) was previously required, it now runs directly on Windows, greatly improving convenience for Windows users. You can check the latest version with claude --version.
Benefits of Native Windows Version
- No WSL required - Runs directly on Windows
- Windows 10/11 compatible - Works on both versions
- One-command install - Official installer handles everything (no separate Node.js install needed)
- Git for Windows recommended, not mandatory - Git Bash enables the Bash tool, while Claude Code can use the PowerShell tool when Git for Windows is not installed
- Windows Package Manager (winget) support - Easy updates via
winget upgrade Anthropic.ClaudeCode - Frequent stability improvements - Fixes for
.bashrcfile handling, console window flashing, OAuth token expiration, proxy settings, bash sandbox errors, and Japanese IME support
Installation Steps¶
1. Run Official Installer in PowerShell¶
Administrator privileges are not required. Execute the following command in PowerShell:
irm https://claude.ai/install.ps1 | iex
This is the official installer from Anthropic. It automatically installs the Claude Code binary to ~/.local/bin — no separate Node.js installation is required.
Alternative: Install via Windows CMD or WinGet
**Windows CMD** (if you prefer Command Prompt over PowerShell):curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
winget install Anthropic.ClaudeCode
Prefer Native Install for Windows-first setup
Anthropic's current setup guide lists Native Install (Recommended), Homebrew, and WinGet in the main install path. npm is still supported under advanced installation options and requires Node.js 18 or later. For most Windows users, the native PowerShell or CMD installer is the shorter path.
2. Authentication¶
After installation, run claude for the first time. A browser window will open automatically for OAuth authentication — no API key management needed.
claude
Git for Windows is optional, but useful
Claude Code can run natively on Windows from PowerShell or CMD. Git for Windows is recommended because it provides Git Bash for the Bash tool. Without Git for Windows, Claude Code can use the PowerShell tool instead.
If Git Bash is installed in a non-standard location, set it explicitly in settings.json:
{
"env": {
"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
}
}
3. Important Steps After Installation¶
Required: Restart Your Terminal
After installation is complete, you must close the terminal window and open a new one. This is necessary to apply the PATH changes.
Verify Installation with claude doctor
After installation, run claude doctor to check your installation type, version, and detect common configuration issues.
Troubleshooting¶
When claude Command is Not Recognized¶
Symptoms¶
PS C:\Users\YourUser> claude
claude : The term 'claude' is not recognized as the name of a cmdlet, function, script file, or operable program.
or:
Native installation exists but C:\Users\<YourUsername>\.local\bin is not in your PATH.
Cause and Solution (Official Installer)¶
The official installer places the binary in ~/.local/bin. If this path is not in your PATH, the command won't be found.
Check if
.local\binis in your PATH$env:PATH -split ";" | Where-Object {$_ -like "*.local*"}Add to PATH if missing
# Add .local\bin to the user PATH without copying the merged process PATH $claudeBin = "$env:USERPROFILE\.local\bin" $userPath = [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User) if (($userPath -split ";") -notcontains $claudeBin) { $newUserPath = if ([string]::IsNullOrWhiteSpace($userPath)) { $claudeBin } else { "$userPath;$claudeBin" } [Environment]::SetEnvironmentVariable("Path", $newUserPath, [EnvironmentVariableTarget]::User) } # Apply to current session as well $env:Path = "$env:Path;$claudeBin"Verify Operation
claude --version
If It Still Doesn't Work¶
Test with direct execution:
& "$env:USERPROFILE\.local\bin\claude.exe"
Troubleshooting for legacy npm installation
If you previously installed via npm (`npm install -g @anthropic-ai/claude-code`), the binary is in a different location: 1. **Check npm global prefix**npm config get prefix
# Example output: C:\Users\<YourUsername>\npm-global
$env:PATH -split ";" | Where-Object {$_ -like "*npm*"}
# Add npm-global to PATH if not included
$npmPrefix = npm config get prefix
$userPath = [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User)
if (($userPath -split ";") -notcontains $npmPrefix) {
$newUserPath = if ([string]::IsNullOrWhiteSpace($userPath)) { $npmPrefix } else { "$userPath;$npmPrefix" }
[Environment]::SetEnvironmentVariable("Path", $newUserPath, [EnvironmentVariableTarget]::User)
}
Clipboard Image Paste¶
Current Behavior¶
Clipboard handling depends on the terminal and version
Current Claude Code releases include Ctrl+V image-paste handling and Windows-specific Alt+V fixes.1 Try Ctrl+V first in an up-to-date native session, then use Alt+V or a file when the terminal cannot pass the image clipboard through.
Alternative Methods¶
Method 1: Try Ctrl+V, then Alt+V - Copy the screenshot and press Ctrl+V in the Claude Code prompt - If the terminal does not pass the image clipboard through, use Alt+V - Update Claude Code before diagnosing an older clipboard limitation
Method 2 (Most Reliable): Save as File and Drag & Drop - Save the screenshot to a file first - Drop directly into Claude Code window
Method 3: Specify File Path
Please look at this image: C:\Users\YourUser\Pictures\screenshot.png
Troubleshooting Checklist¶
If the clipboard image is not detected
Run claude update, open a new terminal, and retry Ctrl+V. If the integrated terminal or clipboard format still fails, use Alt+V or file-based sharing.
Why Old Instructions Differ¶
Older Windows guidance treated Alt+V as the only image shortcut. Claude Code has since added Ctrl+V image-paste handling and shipped multiple Windows and WSL clipboard fixes.1 The reliable guidance is therefore version- and terminal-aware rather than a blanket claim that Ctrl+V only accepts text.
Comparison with WSL Version¶
Native Windows Version Benefits¶
- Easy setup - No need for WSL installation/configuration
- Windows integration - Runs directly in PowerShell/Command Prompt
- Lightweight - No need to start Linux environment
- Windows permissions - Direct access to Windows file system
WSL Version Benefits¶
- Leverage existing Linux environment - No additional setup needed if WSL environment already exists
- Bash tool sandboxing - WSL 2 supports sandboxing for enhanced security (WSL 1 does not)
- Package management - Can use Linux package managers like apt/yum
- Container integration - Seamless integration with Docker, etc.
Official Recommendation¶
Anthropic Official: Native Install is Recommended
The official documentation lists "Native Install" as the recommended installation method. For Windows, both native Git Bash and WSL are supported options. WSL 2 offers additional sandboxing security, while native Git Bash provides simpler setup.
Usage Guidelines¶
Use Native Windows Version When (Officially Recommended)
- General usage (officially recommended)
- Doing Windows development
- Git Bash is available, or PowerShell-only operation is acceptable
- Want to use simply
Use WSL Version When
- WSL environment already set up
- Want to integrate with Docker
- Need Linux toolchain
Summary¶
Claude Code's native Windows version makes it possible to start using it easily without WSL setup. While there are limitations with clipboard image pasting, image sharing via files works without problems.
Clipboard behavior can still vary by terminal, so keep Alt+V and file-based sharing as fallbacks after trying Ctrl+V on the current release.
Checklist
- Run official installer in PowerShell (
irm https://claude.ai/install.ps1 | iex) - Run
claudeand authenticate via browser - Restart terminal
- Verify PATH configuration (
.local\binin PATH) - Verify
claudecommand operation
FAQ¶
How do I fix "claude is not recognized as cmdlet" on Windows?¶
Close and reopen your terminal after installation. If it still fails, add ~/.local/bin to your PATH:
$claudeBin = "$env:USERPROFILE\.local\bin"
$userPath = [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User)
if (($userPath -split ";") -notcontains $claudeBin) {
$newUserPath = if ([string]::IsNullOrWhiteSpace($userPath)) { $claudeBin } else { "$userPath;$claudeBin" }
[Environment]::SetEnvironmentVariable("Path", $newUserPath, [EnvironmentVariableTarget]::User)
}
Does Claude Code work on Windows without WSL?¶
Yes. Since 2025 Claude Code runs natively on Windows 10/11. Install with irm https://claude.ai/install.ps1 | iex in PowerShell. Git for Windows is recommended for Bash tool support, but WSL is no longer required.
How do I paste images in Claude Code on Windows?¶
Try Ctrl+V first on the current Claude Code release. If your terminal cannot pass the image clipboard through, use Alt+V or save the screenshot and drag the file into the window.
Should I use native Windows or WSL for Claude Code?¶
Anthropic recommends native install for general usage. Use WSL if you already have a WSL environment, need Docker integration, or want bash tool sandboxing (WSL 2 only).
Related Articles¶
- Fix "claude is not recognized as internal or external command" — All-OS PATH troubleshooting
- Claude Code Auto Approve: How to Auto-Accept Edits & Commands — Configure auto-approval safely
- Claude Code Remote Access Guide — SSH and remote development setup
- Serena MCP Setup Guide — Add full codebase understanding to Claude Code
- Claude Code Complete Guide
- Claude Code Troubleshooting
Claude Code changelog — Ctrl+V image-paste handling and Windows/WSL clipboard fixes. ↩↩