How To Install Windows Subsystem for Linux on Windows 11

Microsoft’s Windows Subsystem for Linux (WSL) has emerged as a powerful tool for developers and users alike, enabling the installation of a Linux distribution and the use of various Linux tools directly on a Windows operating system. This innovation allows for a seamless experience, eliminating the need for dual-booting or relying on virtual machines to access Linux functionalities.

WSL facilitates true interoperability between Windows and Linux, allowing users to navigate the Linux filesystem from Windows and vice versa. This integration empowers developers to utilize the Linux command line tools while still operating within the familiar Windows environment, enhancing productivity and flexibility.

What You’ll Need

To embark on this installation journey, you will require just two essentials: a functioning Windows 11 machine and an active network connection. With these in place, you are ready to proceed.

Installing WSL on Windows 11

Begin by logging into your Windows 11 system. Click on the menu button and type “Powershell” in the search bar. Once the Powershell application appears, click to open it. The installation process has been simplified significantly; you can now install WSL with a single command:

wsl --install

Executing this command initiates the installation of WSL along with the default distribution, which is Ubuntu. Upon completion, a reboot will be necessary for the changes to take effect. After restarting, you will be prompted to create a Linux username and password, after which you will find yourself in a Linux-like command prompt, ready to explore.

To test the installation, you might want to create a new directory using the command:

mkdir NEWSTACK

Additionally, Python is pre-installed, allowing you to start developing Python applications without any additional setup.

What if You Want to Use a Different Linux Distribution?

While Ubuntu is the default, WSL supports a variety of Linux distributions. To explore the available options, you can issue the following command:

wsl.exe -l -o

This command will provide a list of distributions you can install. If you wish to install a different distribution, such as openSUSE Leap, simply re-open Powershell and enter:

wsl --install -d openSUSE-Leap-15.6

Each distribution may have slightly different installation processes. For instance, openSUSE will prompt you for a full name, username, and password during setup, differing from the Ubuntu installation.

How To Open Your Installed Distribution

Accessing your installed distribution is straightforward. Just type the name of the distribution, like ubuntu, into the Windows menu search bar. Alternatively, you can launch it via Powershell by typing the distribution’s name. If you have multiple distributions installed, you can open each one in the same manner.

For those eager to experiment with the latest WSL preview features, joining the Windows Insider Program is necessary, as the stable release will not include these cutting-edge updates. With WSL installed, users can harness the power of Linux tools directly on their Windows desktops, significantly enhancing their development capabilities.

Winsage
How To Install Windows Subsystem for Linux on Windows 11