How to Enable WSL2 on Windows 11: A Step-by-Step Guide

If you’re a developer, IT professional, or just someone who enjoys using Linux tools alongside Windows, you’ll love Windows Subsystem for Linux 2 (WSL2). It allows you to run a full Linux kernel inside Windows 11 without needing a dual-boot setup or heavy virtual machines.

In this guide, I’ll walk you through everything you need to know to enable WSL2 on Windows 11, step by step. By the end, you’ll have a working Linux environment integrated seamlessly into your Windows system.


What is WSL2 and Why Use It?

WSL2 is the second version of the Windows Subsystem for Linux. Unlike WSL1, which translated Linux calls into Windows calls, WSL2 actually runs a lightweight virtualized Linux kernel.

Benefits of WSL2:

  • Full Linux kernel with improved compatibility.
  • Faster file system performance.
  • Ability to run Docker and containerized apps.
  • Access to both Windows and Linux tools side by side.

It’s like having two worlds in one computer—the power of Linux with the convenience of Windows.


Requirements for Enabling WSL2 on Windows 11

Before diving in, make sure your system meets the requirements.

1. Windows 11 Version

  • You’ll need Windows 11 (Build 22000 or later).
  • To check, press Windows + R, type winver, and press Enter.

2. Hardware Virtualization

  • WSL2 requires virtualization enabled in BIOS/UEFI.
  • Look for Intel VT-x or AMD-V in your BIOS settings.

3. Internet Connection

  • Needed for downloading the Linux kernel and distributions.

Step-by-Step Guide to Enable WSL2 on Windows 11

Step 1: Open PowerShell as Administrator

  1. Press Windows + S, type PowerShell.
  2. Right-click Windows PowerShell → Select Run as Administrator.

Step 2: Install WSL (Windows Subsystem for Linux)

Run this command in PowerShell:

wsl --install

This will:

  • Enable the required components.
  • Install the latest Linux kernel.
  • Set WSL2 as the default version.
  • Install Ubuntu as the default Linux distribution.

If you want a different distro, don’t worry—you can change it later.


Step 3: Restart Your Computer

After the installation, restart your PC to apply changes.


Step 4: Verify WSL Version

After rebooting, open PowerShell and type:

wsl --version

You should see WSL version info. To confirm WSL2 is the default:

wsl --set-default-version 2

Step 5: Install a Linux Distribution

By default, Ubuntu will be installed. But you can install others too:

Option A: Using Microsoft Store

  1. Open Microsoft Store.
  2. Search for distributions like Ubuntu, Debian, Kali Linux, or openSUSE.
  3. Click Install.

Option B: Using Command Line

List available distros:

wsl --list --online

Install a distro:

wsl --install -d Debian

Step 6: Launch Your Linux Distribution

  • After installation, open Start Menu → type distro name (e.g., Ubuntu) → Launch.
  • The first time you open it, you’ll need to set up a username and password.

Step 7: Update Linux Packages

Inside your Linux terminal, update packages:

sudo apt update && sudo apt upgrade -y

Now your Linux system is ready to use inside Windows 11!


Advanced WSL2 Configuration

1. Managing Multiple Distros

Check installed distributions:

wsl --list --verbose

Set default distro:

wsl --set-default <DistroName>

2. Accessing Windows Files in Linux

Your Windows C: drive is accessible under /mnt/c. Example:

cd /mnt/c/Users/YourName/Documents

3. Running Linux GUI Apps

WSL2 on Windows 11 supports GUI apps out of the box. Just install your Linux GUI software, and launch it—it’ll open in a Windows window.

4. Using WSL with Docker

Docker Desktop integrates seamlessly with WSL2, making container development easy.


Troubleshooting Common Issues

Issue 1: Virtualization Not Enabled

  • Go to BIOS → Enable Intel VT-x or AMD-V.
  • Restart and try again.

Issue 2: Old WSL Version Installed

Update WSL with:

wsl --update

Issue 3: Kernel Update Required

Download and install the latest Linux kernel update package from Microsoft’s website.

Issue 4: Distro Installation Fails

Try uninstalling and reinstalling the distro from Microsoft Store.


Alternative Method: Manual Installation

If wsl --install doesn’t work, you can install manually:

  1. Enable optional features:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  1. Restart your PC.
  2. Install WSL2 Linux kernel update package (download from Microsoft site).
  3. Set WSL2 as default:
wsl --set-default-version 2

Best Linux Distros for WSL2 on Windows 11

  • Ubuntu – Beginner-friendly, widely supported.
  • Debian – Lightweight and stable.
  • Kali Linux – For security and penetration testing.
  • Fedora Remix – Good for developers.
  • openSUSE – For advanced users.

Tips for Using WSL2 Efficiently

  • Use Windows Terminal for multiple tabs and better experience.
  • Integrate with VS Code using the Remote – WSL extension.
  • Store heavy project files in the Linux file system for better performance.
  • Use aliases in .bashrc for quick commands.

Conclusion

Enabling WSL2 on Windows 11 is easier than ever. With just one command (wsl --install), you can set up a powerful Linux environment right inside Windows. Whether you’re coding, running servers, experimenting with Docker, or simply exploring Linux, WSL2 gives you the best of both worlds.

So go ahead, enable WSL2, pick your favorite Linux distro, and start exploring!


FAQs

1. Is WSL2 free to use on Windows 11?

Yes, WSL2 is completely free for all Windows 11 users.

2. Can I run GUI Linux apps with WSL2 on Windows 11?

Yes, Windows 11 supports Linux GUI apps natively in WSL2.

3. Do I need Hyper-V to use WSL2?

No, WSL2 uses its own lightweight virtualization and doesn’t require Hyper-V.

4. Can I run multiple Linux distros at once in WSL2?

Yes, you can install and run multiple distros side by side.

5. Is WSL2 faster than WSL1?

Yes, WSL2 has better performance and compatibility since it uses a real Linux kernel.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top