A Beginner’s Guide to Installing WSL on Windows 11
The Windows Subsystem for Linux (WSL) lets you run a full Linux environment directly on Windows. It’s a powerful tool for developers, sysadmins, and anyone who wants to use Linux tools without leaving Windows. Here’s how to install it.
Step 1: Initial Installation
-
Open PowerShell as Administrator.
-
Run the command:
wsl --install
This single command does the heavy lifting: it enables the required Windows features, downloads the latest WSL kernel, and installs the default Ubuntu distribution.
Step 2: Enable Features and Restart
A dialog will appear asking to enable the Virtual Machine Platform and Windows Subsystem for Linux. Confirm by pressing OK. Your computer will then need to restart to apply these changes.
Step 3: Explore Available Distributions (Optional)
After the restart, you can see all the Linux distributions available for installation. Open PowerShell (admin rights are no longer needed for this) and type:
wsl --list --online
You’ll see a list like “Ubuntu,” “Debian,” “Kali-Linux,” and “openSUSE-42.”
Step 4: Install a Specific Distribution (Optional)
The wsl --install command defaults to Ubuntu. If you want a different one, use the --distribution flag (or its short form -d).
For example, to install Debian:
wsl --install --distribution Debian
Step 5: Set Up Your Linux User
Once the installation finishes, a terminal window for your new Linux distribution will open. The final step is to:
-
Create a new username
-
Create a password
This user is automatically added to the sudo group, giving you administrative privileges inside your Linux environment.
You’re Done!
Congratulations! WSL is now ready to use. You can launch your Linux distribution by typing its name (e.g., ubuntu, debian) into the Start Menu or any command prompt.