How To Use Windows Subsystem for Linux

The Windows Subsystem for Linux lets you run Linux builds on top of Windows operating systems. Learn about WSL’s features, installation process, and frequently asked questions.

Brien Posey

February 1, 2023

4 Min Read
Linux in neon lights
Getty Images

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

While there are several different ways that a user could 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 Windows Subsystem for Linux?

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

A secondary benefit is that WSL will support multiple Linux distributions. Some of the 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 (Build 19041 or higher is required). 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 somewhat complex process. Today, the process is far simpler.

To install the Windows Subsystem for Linux, follow these steps:

1. Open an elevated Command Prompt window.

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

Related:How To Create Ubuntu Virtual Machines the Easy Way

3. Enter the following command to see a list of the distributions that are currently available: wsl --list --online

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

Screenshot of Windows Command Prompt window, which displays list of available Linux distributions

WSL 1

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

5. When prompted, supply a username and password to complete the process. The username and password that you enter will be used solely by WSL and does not need to match your Windows credentials.

Frequently Asked Questions

 

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

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

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

When you install WSL, the Linux files are kept separate from Windows files. Even so, the two operating systems’ file systems are accessible from one another.

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

When entering this command, it is important to include the extra period at the end, because that opens Explorer to the current directory.

If you want to access your C: drive from the 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 to the terminal (command line) environment. As such, you will need to launch the application from the command line rather than using a point-and-click GUI environment.

Launching an application typically 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 are the differences between the Windows and Linux versions of the Windows Subsystem for Linux?

The main difference is the absence of a GUI environment. If you were to download Ubuntu and install it in a virtual machine, for example, you would be presented with the full GUI environment. Conversely, installing Ubuntu through WSL gives you a terminal-only environment. You can manually install a GUI environment, but WSL will not use a GUI by default.

What are the performance differences between the Windows and Linux versions of the Windows Subsystem for Linux?

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

What are the limitations of the Windows Subsystem for Linux?

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

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

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

About the Author(s)

Brien Posey

Brien Posey is a bestselling technology author, a speaker, and a 20X Microsoft MVP. In addition to his ongoing work in IT, Posey has spent the last several years training as a commercial astronaut candidate in preparation to fly on a mission to study polar mesospheric clouds from space.

http://brienposey.com/

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like