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

Windows Subsystem for Linux (WSL) is a set of tools that allows you to run Linux software on your Windows PC, and Windows 11 is no exception.

 When you enable WSL, Windows installs a custom designed Linux kernel. Then you can install Ubuntu or any other Linux distribution on your PC quickly and safely.

How WSL works on Windows 11

First, you can activate Windows Subsystem for Linux (WSL) on all versions of Windows 11 — including Windows 11 Home.

Also, like Windows 10, Windows 11 uses WSL 2. This second version is redesigned and runs the full Linux kernel in the Hyper-V hypervisor for improved compatibility. When you enable this feature, Windows 11 automatically downloads a Linux kernel built by Microsoft to run in the background. At the same time, Windows Update will always ensure that the kernel is in an up-to-date state. (You can also use your own custom Linux kernel if you want).

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

You can also access your Linux shell environments in the Windows Terminal application that comes with Windows 11.

In addition, you can run graphical Linux applications right 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 applications with GPU access, helping Linux graphics-related workloads run well on Windows.

Method 1: Install WSL with the command

On Windows 11, you can enable WSL and install a Linux distribution like Ubuntu with a fairly simple command.

First, you will need to use a command line with administrator privileges. This article will show you how to work with Windows Terminal, but you can also use Command Prompt.

To launch Windows Terminal with administrator rights, 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 the Start menu — right-click it and select 'Run as Administrator.' Agree to the User Account Control prompt that appears.

Picture 1 of How to install Windows Subsystem for Linux (WSL) on Windows 11

To enable WSL and install Ubuntu (the default distribution), you just need to run the following command:

wsl --install

When the process is complete, Windows will ask you to restart your PC. After the system boots, you will be able to use your Linux system immediately. (You can right-click the Start menu and select Shut Down or Sign Out > Restart to quickly reboot.

Picture 2 of How to install Windows Subsystem for Linux (WSL) on Windows 11

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

wsl -l -o

You can install the Linux distribution of your choice by running the following command, replacing 'Name' with the name of the Linux distribution, as shown in the 'Name' column below:

wsl --install -d Name

For example, to install Debian instead of Ubuntu, you run the following command:

wsl --install -d Debian

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

Picture 3 of How to install Windows Subsystem for Linux (WSL) on Windows 11

After the computer restarts, you can launch the Linux distribution you installed from the Start menu.

Picture 4 of How to install Windows Subsystem for Linux (WSL) on Windows 11

Now you can use the Linux shell as if you were on a Linux PC

Method 2: Enable WSL and install the distribution

This is the more 'traditional' and cumbersome method. Therefore, it should only be used if method 1 above cannot be done.

Start by opening the Start menu and searching for the keyword 'Windows features'. Launch the 'Turn Windows Features On or Off' shortcut.

Next, check the box next to 'Windows Subsystem for Linux' here and click 'OK'. You will be prompted to restart your computer.

Picture 5 of How to install Windows Subsystem for Linux (WSL) on Windows 11

After the computer restarts, open the Microsoft Store app and search for the Linux distribution you want to use, such as 'Ubuntu'.

Install the Linux distribution you want to use (e.g. Ubuntu) as you would any other application. Just click the 'Install' button on its Store page.

You can now launch the distro from the Start menu just like if it was installed from the command as method 1.

Picture 6 of How to install Windows Subsystem for Linux (WSL) on Windows 11

Update 09 August 2021
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile