Complete WSL Guide for Windows 11

Created using Perplexity AI

Windows Subsystem for Linux (WSL) Guide for Windows 11

Inspired by NetworkChuck’s practical approach, adapted for any Linux distro!


1. Prerequisites


2. Install WSL - Windows Subsystem for Linux

Open Windows Terminal as Administrator and run:

powershell
wsl --install

Reboot your PC when prompted.


3. Install a Different Linux Distribution

To see available Linux versions:

powershell
wsl --list --online

Example: Install Fedora Linux

powershell
wsl --install -d FedoraLinux-42

Alternative: Via Microsoft Store


4. Initial Setup


5. Keeping Your WSL Distributions Up-to-Date

Update the Linux Kernel (if prompted):

powershell
wsl --update

Update Linux Packages (inside your distro):


6. Basic WSL Management


7. Troubleshooting: Resetting the Root Password

If you forget/lost your root password for a WSL distro:

a. Launch as Root (no password needed):

powershell
wsl -d <distro-name> -u root

b. Reset Your User Password

passwd username

(Enter and confirm your new password.)

List all users if needed:

cat /etc/passwd

c. Exit and Relaunch Normally


8. Extra Tips


Bonus: GUI Integration and Docker Support

A. GUI Integration with WSLg

Windows 11 (and updated Windows 10) includes WSLg (Windows Subsystem for Linux GUI), so you can run Linux graphical apps natively.

How to Use

To install more GUI apps:


B. Docker Support on WSL2

  1. Install Docker Desktop (from the official Docker website).
  2. During setup, select “Use WSL2 instead of Hyper-V”.
  3. Launch Docker Desktop, verify your WSL2 distros are listed in
    Settings > Resources > WSL Integration.
  4. Enable integration for your distro.
  5. From your WSL terminal, test Docker:
    docker --version
    docker run hello-world
    

Enjoy combining the best of Linux and Windows!

Video Preview: Linux on Windows……Windows on Linux

Linux on Windows......Windows on Linux

Watch here: Linux on Windows……Windows on Linux

Short Description:
This video by NetworkChuck provides an in-depth, practical guide to using WSL 2 on Windows 11. It covers installation, setup, command and GUI interoperability, Docker usage, file integration, and advanced troubleshooting—perfect for anyone wanting to combine the power of Linux with the convenience of Windows!