What is WSL2? The Windows Subsystem for Linux version 2 (WSL2) lets you run real Linux distributions—including Ubuntu, Kali Linux, and CentOS Stream—directly on Windows without dual-booting or full VMs.
Which Linux Distribution Should You Choose?
🐧 Ubuntu (Recommended for Beginners)
Stable, well-documented, and ideal for general development, OpenSearch, Python, and DevOps.
💀 Kali Linux (For Cybersecurity & CEH Students)
Pre-loaded with 600+ penetration testing tools (Nmap, Metasploit, Wireshark, Burp Suite CLI). Perfect for ethical hacking labs.
⚙️ CentOS Stream (For Enterprise/Red Hat Practice)
Note: CentOS Linux 10 was discontinued in 2021. Use CentOS Stream 9 or 10—the rolling-release successor supported by Red Hat.
Prerequisites
- Windows 10 (Version 2004+, Build 19041+) or Windows 11
- 64-bit CPU with virtualization enabled (default on most PCs)
- Admin rights
Step 1: Enable WSL2 (Required for All Distributions)
- Open PowerShell as Administrator
- Run:
wsl --install --no-distribution
- Restart your computer when prompted
This installs WSL2 core components without a default Linux distro.
Step 2: Install Your Preferred Linux Distribution
Option A: Install Ubuntu (Default & Recommended)
wsl --install -d Ubuntu-22.04
Option B: Install Kali Linux
- Open PowerShell as Admin
- Run:
wsl --install -d KaliLinux
- After reboot, Kali will launch automatically
- Create a username and password (not root by default)
- To use root:
sudo su -or set root password withsudo passwd root
💀 Kali comes with tools like
nmap, sqlmap, hydra, and metasploit-framework pre-installed!
Option C: Install CentOS Stream
CentOS Linux 10 is discontinued. Use CentOS Stream instead:
- Open PowerShell as Admin
- Install from Microsoft Store:
- Go to: CentOS Stream 9 on Microsoft Store
- Click Install
- OR install via command line (if available):
# Note: CentOS Stream may not be in default WSL list wsl --list --online
If listed, run:
wsl --install -d CentOSStream9 - After install, launch from Start Menu → “CentOS Stream”
- Set up user account when prompted
⚠️ CentOS Stream is a rolling-release distro. It’s forward-looking (like a beta for RHEL) and may not be as stable as Ubuntu for beginners.
Step 3: Verify & Use Your Linux Distro
List all installed WSL distros:
wsl -l -v
Launch a specific distro:
wsl -d KaliLinux
wsl -d Ubuntu-22.04
Access Files Between Windows & Linux
- From Linux → Windows:
/mnt/c/Users/YourName - From Windows → Linux: Open File Explorer and go to:
\\wsl$\Ubuntu-22.04or\\wsl$\KaliLinux
Next Steps
- Update your system:
sudo apt update && sudo apt upgrade(Ubuntu/Kali) - Install OpenSearch, Docker, or cybersecurity tools
- Use VS Code with the “Remote - WSL” extension for seamless development