A Linux terminal showing the Ubuntu logo in the Windows Terminal on Windows 10.

The Windows Subsystem for Linux (WSL) lets you run Linux software on your Windows 11 PC. When you enable WSL, Windows will install a custom-built Linux kernel. You can then install Ubuntu or another Linux distribution of your choice.

How WSL Works on Windows 11

You can enable the Windows Subsystem for Linux (WSL) on all editions of Windows 11—even Windows 11 Home. (You can also install WSL on Windows 10.)

Like more recent versions of Windows 10, Windows 11 uses WSL 2. This second version is redesigned and runs a full Linux kernel in a Hyper-V hypervisor for improved compatibility. When you enable the feature, Windows 11 downloads a Microsoft-built Linux kernel that it runs in the background. Windows Update keeps the kernel updated. (You can use your own custom Linux kernel if you prefer, too.)

To use WSL, you’ll need to install a Linux distribution. By default, WSL installs Ubuntu. This will give you access to a full Ubuntu command-line environment using the Bash shell or any other command-line shell of your choice.

You can access your Linux shell environments in the Windows Terminal app included with Windows 11, too.

Advertisement

You can also run graphical Linux apps out of the box (Just install them in the Linux command-line environment and run the command.). Windows 11 also includes support for running Linux apps with GPU access, making GPU-accelerated Linux computing workloads run well on Windows.

The Fast Way: Install WSL with a Command

Microsoft has made this process extremely simple on Windows 11. You can enable the Windows Subsystem for Linux and install a Linux distribution like Ubuntu with a single command.

To do this, you will need to use a command-line window with Administrator permissions. We’ll do this with the Windows Terminal, although you can also just launch Command Prompt.

To launch a Windows Terminal with Administrator permissions, right-click the Start button on the taskbar or press Windows+X and click “Windows Terminal (Admin).” (You can also find the Windows Terminal shortcut in your Start menu—right-click it and select “Run as Administrator.”) Agree to the User Account Control prompt that appears.

Right-click the Start button and select "Windows Terminal (Admin)."

To enable the Windows Subsystem for Linux and install Ubuntu, which is the default distribution, just run the following command:

wsl --install

When the process is complete, Windows will ask you to reboot your PC. Restart your computer. You’ll be able to use your Linux system after you do. (You can right-click the Start menu and click Shut Down or Sign Out > Restart to quickly reboot.)

Run the "wsl --install" command.

Advertisement

To list other available Linux distributions, run the following command instead. This lists (-l) distributions that are available online (-o).

wsl -l -o

You can install a Linux distribution of your choice by running the following command, replacing “Name” with the name of the Linux distro, as displayed in the “Name” column:

wsl --install -d Name

For example, to install Debian instead of Ubuntu, you’d run:

wsl --install -d Debian

You can also run this command multiple times to install several Linux distributions on your system.

List available Linux distributions and install one.

Once your computer has rebooted, you can launch the Linux distro that you installed from your Start menu.

Launch the "Ubuntu" shortcut.

You’ll also find it as an option in the Windows Terminal app. Click the down arrow to the right of the new tab “+” button on the tab bar and select the Linux distribution that you installed.

Tip: If you don’t see the Linux distribution that you installed in the Windows Terminal, launch it from your Start menu first. After it completes its first-run setup process, it will appear here.

Click the down arrow and select your Linux distribution.

Now, you can use the Linux shell just as if you were sitting in front of a PC Linux—or as if you were remotely connected to a server running Linux. You’ll just need to know Linux commands.

The Slow Way: Enable WSL and Install a Distro

You can also enable the Windows Subsystem for Linux (WSL) the older way. This takes more clicking, and we recommend just running the command above.

To do this, open your Start menu and search for “Windows features.” (You can press the Windows key to open the Start menu and just start typing.) Launch the “Turn Windows Features On or Off” shortcut.

Enable the “Windows Subsystem for Linux” checkbox here and click “OK.” You will be prompted to reboot your computer.

Enable the "Windows Subsystem for Linux" option and click "OK."

After you do, open the Microsoft Store app and search for the Linux distribution that you want to use. For example, you might search for “Ubuntu.”

Install the Linux distribution that you want to use (like Ubuntu) as you would any other application. Just click the “Install” button on its Store page.

Advertisement

You can now launch it from your Start menu just as if it were installed from the command above.

Install Ubuntu from the Microsoft Store.

Chris Hoffman Chris Hoffman
Chris Hoffman is Editor-in-Chief of How-To Geek. He's written about technology for over a decade and was a PCWorld columnist for two years. Chris has written for The New York Times, been interviewed as a technology expert on TV stations like Miami's NBC 6, and had his work covered by news outlets like the BBC. Since 2011, Chris has written over 2,000 articles that have been read nearly one billion times---and that's just here at How-To Geek.
Read Full Bio »

The above article may contain affiliate links, which help support How-To Geek.