For Windows Users Running Claude Code in WSL
Save your frequently used prompts here for quick access. These are examples to get you started - click the + button to add your own!
Analyze this codebase and create a comprehensive README
Generate project documentation
Refactor this function to be more efficient and add error handling
Improve code quality
Create unit tests for this component with edge cases
Generate comprehensive tests
Commands for bridging between your Windows files and WSL Linux environment. Remember: work in WSL home for speed!
cd /mnt/c/Users/YourWindowsUsername
Go to Windows user folder
cd /mnt/c/Users/YourWindowsUsername/Desktop
Go to Windows Desktop
cd /mnt/c/Users/YourWindowsUsername/Downloads
Go to Windows Downloads
explorer.exe .
Open current folder in Windows Explorer
wslpath -w /home/YourWSLUsername/project
Convert WSL path to Windows path
wslpath -u "C:\Users\YourWindowsUsername\file.txt"
Convert Windows path to WSL path
echo "text" | clip.exe
Copy to Windows clipboard
pwd | clip.exe
Copy current path to clipboard
code .
Open VS Code in current directory
notepad.exe filename.txt
Open file in Windows Notepad
cmd.exe /c dir
Run Windows CMD commands
powershell.exe -c "Get-ChildItem"
Run PowerShell commands
wslview https://example.com
Open URL in Windows browser
wslview index.html
Open local HTML file in browser
Essential setup tips for optimal Claude Code performance in WSL. These practices prevent common issues Windows users face.
cd ~
Go to WSL home (fast filesystem)
mkdir -p ~/projects
Create projects directory in WSL home
cd ~/projects && git clone https://github.com/user/repo.git
Clone directly to WSL filesystem
cp /mnt/c/Users/YourWindowsUsername/Downloads/project.zip ~/projects/
Copy from Windows to WSL home
cd ~/projects && unzip project.zip
Extract in WSL filesystem
Critical commands for safely handling files between Windows and Linux. Avoid corruption by using proper tools and commands.
cp /mnt/c/Users/YourWindowsUsername/Downloads/file.txt .
Copy from Windows Downloads
dos2unix filename.txt
Convert Windows line endings to Unix
chmod +x script.sh
Make script executable (common WSL issue)
chmod 755 file.sh
Set standard execute permissions
Version control commands for managing your code. Git works the same in WSL as on any Linux system.
git clone https://github.com/user/repo.git
Clone repository
git config --global core.autocrlf false
Disable CRLF conversion (WSL recommended)
git status
Check repository status
git diff
Show uncommitted changes
git log --oneline
View commit history (compact)
git add .
Stage all changes
git commit -m "message"
Commit with message
git push
Push to remote
git pull
Pull from remote
git branch
List branches
git checkout -b feature-branch
Create and switch to new branch
git checkout main
Switch to main branch
git stash
Temporarily save changes
git stash pop
Apply stashed changes
Special phrases that trigger advanced Claude behaviors. Use these to unlock deeper analysis and parallel processing.
think hard about this architecture
Triggers deep architectural analysis
ultrathink through this complex problem
Maximum depth reasoning mode
think deeply about the implementation
Extended implementation planning
reflect carefully on this complex logic
Careful logic analysis and review
deploy 3 sub-agents in parallel to research
Spawn multiple research agents
use multiple agents to analyze different aspects
Parallel multi-perspective analysis
implement and test with full coverage
Activates agentic mode
run without asking for permission
Bypass confirmation prompts
JavaScript/Node.js package management. NPM is like the Microsoft Store but for code libraries and tools.
npm init -y
Initialize package.json quickly
npm install
Install dependencies
npm run dev
Start development server
npm run build
Build for production
npm run test
Run tests
npx playwright test
Run E2E tests with Playwright
npm run lint
Check code style
npx create-react-app my-app
Run package without installing
npm outdated
Check for outdated packages
npm update
Update packages to latest
npm cache clean --force
Clear npm cache
Initial setup and the powerful CLAUDE.md context system. These files tell Claude about your project's specific rules and structure.
npm install -g @anthropic-ai/claude-code
Install Claude Code globally
npm update -g @anthropic-ai/claude-code
Update Claude Code to latest version
echo "alias quickref='...'" >> ~/.bashrc && source ~/.bashrc
Add quickref alias to open this page
cd ~/projects/my-project && claude
Navigate to project and launch Claude
echo "# Project instructions" > CLAUDE.md
Create empty project context file
#use ES6 modules not CommonJS
Add rule to project CLAUDE.md
cat ~/.claude/CLAUDE.md
View global instructions
find . -name CLAUDE.md
Find all context files
~/.claude/CLAUDE.md
- Global instructions (all projects)./CLAUDE.md
- Project root context (loaded at start)./subfolder/CLAUDE.md
- Subdirectory context (also loaded at start)summarize this project
Get AI summary of entire project
/init
Generate project guide in CLAUDE.md
explain the architecture of this codebase
Understand project structure
Model Context Protocol servers extend Claude's abilities. Add GitHub integration, web browsing, and more capabilities.
claude --help
Show Claude Code help
claude mcp list
List MCP servers
claude mcp add github "npx -y @modelcontextprotocol/server-github@latest"
Add GitHub MCP
claude --continue
Continue last conversation session
claude --dangerously-skip-permissions
Skip all permission prompts (use cautiously)
claude commit
Automatic file commits with AI-generated message
mkdir -p ~/.claude/commands
Create global commands folder (not created by default)
echo "Show project status" > ~/.claude/commands/status.md
Create /status command (as .md file)
ls ~/.claude/commands/
List all global commands
mkdir -p .claude/commands
Create project-specific commands
Special chat commands and features. Use @ to reference files, ! to run commands, and drag screenshots directly into chat!
!ls -la
Run terminal command from chat (prefix with !)
@filename.js
Show specific file to Claude
@src/components/
Reference directory contents
Drag & drop screenshot
Works from Windows Explorer to WSL!
Essential keyboard shortcuts for efficient Claude Code usage. Switch between planning and action modes with Shift+Tab!
Shift+Tab
Cycle: Planning → Auto-accept → Normal
Escape (2x)
Access prompt history
Ctrl+C
Cancel current operation
Yes, you can run Claude Code on your Android phone! Termux provides a full Linux environment without rooting.
pkg install nodejs
Install Node.js on Termux
npm install -g @anthropic-ai/claude-code
Install Claude Code on your phone!
pkg install git openssh
Install Git and SSH
Control WSL from Windows side. These commands run in PowerShell/Windows Terminal, not inside WSL itself.
wsl --shutdown
Restart WSL (fixes many issues)
wsl --list --verbose
Show all WSL distros and their status
wsl --terminate Ubuntu
Stop specific WSL distro
wsl --update
Update WSL to latest version
wsl ~
Open WSL directly in home directory
wsl --set-default Ubuntu
Set default WSL distro
wsl --export Ubuntu C:\backup\ubuntu-backup.tar
Backup WSL distro
wsl --import Ubuntu-New C:\WSL\Ubuntu-New C:\backup\ubuntu-backup.tar
Restore WSL backup
Check your WSL setup and keep everything updated. Ubuntu in WSL needs regular updates just like any Linux system.
wsl --version
Check WSL version
lsb_release -a
Check Ubuntu version
sudo apt update && sudo apt upgrade
Update WSL packages
which node
Check Node.js installation path
echo $PATH
View environment PATH
Commands for viewing, searching, and analyzing files. The pipe symbol (|) chains commands together for powerful operations.
cat filename
Display file contents
grep "pattern" filename
Search in file
find . -name "*.js"
Find files by pattern
tail -f logfile.log
Follow log file output
wc -l filename
Count lines in file
dos2unix filename
Convert Windows line endings (CRLF) to Unix (LF)
Essential Linux commands including aliases (shortcuts) and Bash history tricks. These make terminal work much faster!
alias
List all current aliases
alias name
Show specific alias definition
alias ll="ls -la"
Create new alias (temporary)
echo "alias myalias='command'" >> ~/.bashrc
Add permanent alias
source ~/.bashrc
Reload bashrc to apply changes
unalias name
Remove alias from current session
!!
Run the last command again
sudo !!
Run last command with sudo (forgot sudo?)
!npm
Run last command starting with 'npm'
!$
Use last argument from previous command
history | grep git
Search command history
!123
Run command #123 from history
ps aux
Show all running processes
ps aux | grep node
Find specific processes
kill -9 PID
Force kill process by ID
pkill -f "process_name"
Kill process by name
top
Real-time process monitor
htop
Better process monitor (if installed)
df -h
Show disk usage
du -sh *
Directory sizes in current folder
free -h
Show memory usage
history
Show command history
history | grep alias
Search command history
which command
Find location of command
Control your terminal sessions and processes. Always exit cleanly to avoid zombie processes that eat up resources!
exit
Clean exit from WSL session
logout
Alternative clean exit
Ctrl+D
EOF signal - same as exit
Ctrl+C
Stop/kill current process
Ctrl+Z
Suspend process (NOT undo! Still running in background!)
fg
Resume suspended process
bg
Resume process in background
jobs
List background/suspended jobs
kill %1
Kill job number 1
ps aux | grep $USER
See all your processes
ps aux | grep -E "node|npm|python|java" | grep -v grep
Check for common dev processes
lsof -i :3000
Check what's using port 3000
Ctrl+L
Clear screen (same as 'clear')
Ctrl+R
Search command history
!!
Run last command again
sudo !!
Run last command with sudo
Visual file management in terminal! MC gives you a Norton Commander-style interface, while tmux enables multiple terminal sessions.
sudo apt-get install mc
Install Midnight Commander
mc
Launch Midnight Commander
mc -b
Launch MC in black and white mode
F3
View file (internal viewer)
F4
Edit file (internal editor)
F5
Copy file to other panel
F6
Move/rename file
F7
Create directory
F8
Delete file/directory
F9
Access top menu bar
F10
Exit Midnight Commander
Tab
Switch between panels
Insert
Select/deselect file
+ (plus)
Select files by pattern (e.g., *.txt)
- (minus)
Deselect files by pattern
Ctrl+O
Toggle to full terminal view
Alt+.
Show/hide hidden files
Alt+T
Cycle through panel view modes
sudo apt-get install tmux
Install tmux (usually pre-installed)
tmux
Start new tmux session
tmux new -s mysession
Start named tmux session
tmux ls
List all tmux sessions
tmux attach -t mysession
Attach to named session
Ctrl+B then %
Split pane vertically
Ctrl+B then "
Split pane horizontally
Ctrl+B then arrow
Navigate between panes
Ctrl+B then o
Cycle through panes
Ctrl+B then x
Kill current pane
Ctrl+B then c
Create new window
Ctrl+B then n
Next window
Ctrl+B then p
Previous window
Ctrl+B then d
Detach from session
Ctrl+B then Ctrl+arrow
Resize current pane
tmux new "mc"
Start tmux with MC
# Split tmux, run mc in one pane
Use Ctrl+B % then run mc in one pane
Python development in WSL works great! Virtual environments keep your projects isolated from each other.
python3 -m venv venv
Create virtual environment
source venv/bin/activate
Activate virtual environment (WSL/Linux)
pip install -r requirements.txt
Install dependencies
pytest
Run Python tests
Download files directly to WSL and check network connectivity. curl and wget are your download workhorses.
curl -O https://example.com/file.zip
Download file (keep original name)
curl -o output.zip https://example.com/file.zip
Download with custom name
wget https://example.com/file.zip
Alternative downloader
ping google.com
Test connectivity
curl ifconfig.me
Get public IP address
netstat -tuln
Show listening ports
ss -tuln
Modern port listing (faster)
Powerful text manipulation tools built into Linux. Process logs, CSV files, and text data with these commands.
head -n 20 file.txt
Show first 20 lines
tail -n 20 file.txt
Show last 20 lines
less filename
Page through file (q to quit)
sed 's/old/new/g' file.txt
Find and replace text
sort filename.txt
Sort lines alphabetically
sort -n numbers.txt
Sort numerically
uniq sorted.txt
Remove duplicate lines
cut -d',' -f1 data.csv
Extract first column from CSV
grep "pattern" filename
Search for pattern in file
find . -name "*.js"
Find files by pattern
Create and extract compressed files. TAR is Linux native, ZIP works everywhere including Windows.
tar -czf archive.tar.gz folder/
Create compressed tar archive
tar -xzf archive.tar.gz
Extract tar.gz archive
tar -tf archive.tar.gz
List archive contents
zip -r archive.zip folder/
Create zip archive
unzip archive.zip
Extract zip archive
unzip -l archive.zip
List zip contents
Connect to remote servers securely. SSH keys are more secure than passwords - generate one and never type passwords again!
ssh user@hostname
Connect to remote server
ssh -p 2222 user@host
SSH on custom port
ssh-keygen -t rsa -b 4096
Generate SSH key pair
ssh-copy-id user@host
Copy SSH key to server
scp file.txt user@host:~/
Copy file to remote
scp user@host:~/file.txt .
Copy file from remote
scp -r folder/ user@host:~/
Copy directory to remote