How to use Windows Subsystem for Linux (WSL)

Windows Subsystem for Linux (WSL) is an abstraction layer that allows Windows users to install Linux builds on top of Windows.

While there are many different ways a user can run Linux on top of Windows, the Windows Subsystem for Linux is unique in that it does not require a dual-boot setup or a virtual machine.

What are the benefits of using the Windows Subsystem for Linux?

Windows Subsystem for Linux offers an easy way to run Linux apps on a Windows PC. However, there are some additional benefits.

A secondary advantage is that WSL will support multiple Linux distributions. Supported Linux distributions include Ubuntu, OpenSUSE, Kali, Arch Linux, and Debian.

Additionally, WSL is fully supported by Microsoft and will run on Windows 10, version 2004 or higher (requires build 19041 or higher). WSL is also supported for use on Windows 11.

What are the steps to install and use Windows Subsystem for Linux?

At one time, installing the Windows subsystem for Linux was a complicated process. Today, the process is much easier.

To install Windows Subsystem for Linux, follow these steps:

1. Open an elevated command prompt window.

2. Type wsl –install. If this command fails (and displays the WSL help screen), it means that WSL is already installed.

3. Enter the following command to view the list of currently available distributions: wsl –list –online

4. Install the Linux distribution by entering this command: wsl –install -d

Brian Posey

Figure 1. This is how you install a Linux distribution on WSL.

5. When prompted, provide a username and password to complete the process. The username and password you enter will be used entirely by WSL and do not need to match your Windows credentials.

Frequently Asked Questions

What are the different Linux distributions that I can use with Windows Subsystem for Linux?

You can use Ubuntu, Kali, Debian, Kali, SUSE, Oracle, among other Linux distributions.

How do I access Linux files from Windows Subsystem for Linux?

When you install WSL, the Linux files are kept separate from the Windows files. Nevertheless, the file systems of the two operating systems are accessible from each other.

If you want to see where the Linux files are stored, enter the following command in the Linux terminal: explorer.exe.

When entering this command, it is important to add an extra period at the end, as it opens Explorer in the current directory.

If you want to access your C: drive from a Linux terminal, enter this command: cd /mnt/c

How do I launch applications from the Windows Subsystem for Linux?

When you use WSL to install a Linux distribution, the distribution will open in a terminal (command line) environment. Thus, you will need to launch the application from the command line instead of using a point-and-click GUI environment.

Launching an application usually involves two steps:

1. Make the application executable if it is not already by typing this command: chmod +x

2. Launch the application by typing this command: ./

What is the difference between the Windows and Linux versions of the Windows Subsystem for Linux?

The main difference is the absence of a GUI environment. If you want to download Ubuntu and install it in a virtual machine, for example, you’ll be presented with a full GUI environment. In contrast, installing Ubuntu via WSL only gives you a terminal environment. You can install a GUI environment manually, but WSL will not use a GUI by default.

What is the performance difference between the Windows and Linux versions of the Windows Subsystem for Linux?

Opinions on the WSL’s performance vary. Objectively, WSL will never be as fast as a native Linux installation due to the overhead caused by the Windows operating system. Nevertheless, WSL performance is generally quite good and, in some cases, comes close to matching native Linux performance.

What are the limitations of Windows Subsystem for Linux?

Microsoft outlines several differences between WSL and native Linux. Most of these differences aren’t really limitations, but at least one is. WSL’s VM will shut down automatically if there are no open file handles. This means that WSL is not suitable for use as a production server unless it is in constant use.

What are some best practices for using the Windows Subsystem for Linux?

Microsoft recommends that you do not work on all operating systems unless you have a compelling reason to do so. In other words, Windows should be used to access the Windows file system and Linux should be used to access the Linux file system.

Leave a Comment