Cyber Services / All lessons / CEH — Ethical Hacking / Install WSL2 on Windows

Install WSL2 on Windows

Module 2 of 130 · 2 min read · Free to read

MODULES ↓ Command blocks have a COPY button
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)

  1. Open PowerShell as Administrator
  2. Run:
    wsl --install --no-distribution
  3. 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

  1. Open PowerShell as Admin
  2. Run:
    wsl --install -d KaliLinux
  3. After reboot, Kali will launch automatically
  4. Create a username and password (not root by default)
  5. To use root: sudo su - or set root password with sudo 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:

  1. Open PowerShell as Admin
  2. Install from Microsoft Store:
  3. 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

  4. After install, launch from Start Menu → “CentOS Stream”
  5. 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.04 or \\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
Modules (130) ← CEH — Ethical Hacking