How to Install Windows Subsystem for Linux (WSL) on Windows 11

In this guide, we’ll walk through the steps to install the Windows Subsystem for Linux (WSL) on Windows 11 and Windows 10. The installation process is nearly identical for both versions, so you can follow these steps regardless of your Windows version.

Before proceeding with the installation, ensure that hardware virtualization is enabled in your computer’s BIOS. This process varies depending on your computer manufacturer, so consult their documentation for specific instructions on accessing the BIOS and enabling this feature.

How to Install Windows Subsystem for Linux (WSL) on Windows 11

Here, we will discuss two methods to install the Windows Subsystem for Linux (WSL) using the terminal command and the UI interface. Let’s dive in!

1. Installing WSL Using Terminal

First, open the Start menu and search for Command Prompt, PowerShell, or Terminal. For this guide, we’ll use Terminal:

1. Right-click on Terminal and select Run as Administrator.

2. Open a PowerShell session within Terminal.

3. Run the following command. This command will download all the necessary components, enable the required features for WSL, and install the default Ubuntu distribution of Linux.

wsl --install

4. If you prefer a different Linux distribution, run the following command to view a list of available WSL distros you can install:

wsl --list --online

5. Now, you can specify it using this command. Replace <distribution_name> with the name of your desired Linux distribution (e.g., Debian).

wsl --install -d <distribution_name>

6. After the installation, restart your computer. Upon reboot, the Ubuntu console (or the console for your chosen distribution) will open automatically to complete the setup. Follow the prompts to create a username and password for your Linux environment.

2. Installing WSL via the Microsoft Store

If you prefer not to use commands, then you can download and install WSL from the Microsoft Store. Follow these steps:

1. Open the Start menu and search for Turn Windows features on or off.

2. Enable Virtual Machine Platform and Windows Subsystem for Linux.

3. Click on OK to save the change and restart your computer.

4. After that, open Microsoft Store.

5. Search for a Linux distribution (e.g., Debian) in the Microsoft Store and select it from the search result.

6. Click Get/Install button to install WSL and then open the app to complete the setup.

How to Update WSL on Windows 11

This ensures you have the latest version of WSL with any recent improvements or fixes. To manually update WSL, follow these steps:

1. Open Terminal as an administrator.

2. Type the following command and press the Enter key:

wsl --update

3 After that, restart your computer to apply the changes.

Conclusion

That’s it! You now know how to install the Windows Subsystem for Linux on both Windows 10 and 11 using two different methods. I hope this guide helps you unlock the full potential of WSL for your development needs. If you ever need to uninstall WSL, refer to the linked detailed guide on how to remove it completely from your system.

Posted by Arpita

With a background in Computer Science, she is passionate about sharing practical programming tips and tech know-how. From writing clean code to solving everyday tech problems, she breaks down complex topics into approachable guides that help others learn and grow.