💻 What is WSL?
- WSL allows running real Linux environments inside Windows.
- No need for virtual machines — very fast and lightweight.
- Supports running command-line tools, development environments, and even GUI apps (on Windows 11).
📋 Prerequisites
- Windows 10 (version 2004, Build 19041 or later) or Windows 11
- Administrator access to enable features
- Internet connection to download Linux distributions
- Ensure hardware virtualization is enabled in BIOS
⚙️ Install WSL
- Open PowerShell as Administrator
- Run:
wsl --install
- Restart your computer
- By default, Ubuntu will be installed. You can install others later.
📦 Install Specific Linux Distributions
- View available distributions:
wsl --list --online
- Install a specific distribution (example: Debian):
wsl --install -d Debian
- List installed distributions:
wsl --list --verbose
- Set default distribution:
wsl --set-default Ubuntu
🚀 Using WSL
- Launch from Start Menu (e.g. "Ubuntu")
- Or from PowerShell / Command Prompt:
wsl
- Access Windows files from WSL:
/mnt/c/Users/YourName
- Access WSL files from Windows:
\\wsl$\Ubuntu
⚖️ WSL 1 vs WSL 2
🛠 Useful Commands
🖥 GUI App Support (Windows 11)
- WSL 2 supports GUI Linux apps natively
- Simply install with your package manager (e.g. apt)
- Run GUI apps like
gedit, firefox, etc. directly from the WSL terminal
⚡ Best Practices
- Store project files inside WSL filesystem (not in
/mnt/c) for better performance
- Use
sudo apt update && sudo apt upgrade regularly
- Back up important files from your Linux home folder
🧯 Troubleshooting
- If
wsl command is not found → Update Windows
- If WSL install stuck → Enable virtualization from BIOS
- If WSL is slow → Use WSL 2 and keep files inside Linux file system
- If networking fails → Restart LxssManager service or run
wsl --shutdown