Simplified process

How to install WSL 2 with one command on Windows 10

You can now install all the WSL2 components with a single command, and here's how to do it.

WSL2 quick install on Windows 10

Although, on Windows 10, the installation of the Windows Subsystem for Linux 2 is not a difficult process, it takes a lot of steps, even more if you also want to set WSL2 as the default. However, in future releases, Microsoft is working on simplifying the installation process to reduce the steps to only one command that enables the WSL components, virtual machine platform, and prompt you to restart.

In addition, the new command will also install the latest Ubuntu distro by default. If you prefer another distribution of Linux, there’s an option to add in the command to select another Linux distro install. Alongside the new quick and easy process, there’s a new command to make it easier to update the kernel with only one command.

In this guide, you’ll learn the easy steps to install the WSL 2 platform on your device. In addition, we’ll outline the steps to update the Linux kernel on Windows 10 (build 20246 and higher).

Install Windows Subsystem for Linux 2 components

To quickly install WSL2 using Command Prompt, use these steps:

  1. Open Start on Windows 10.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to install the WSL 2 and press Enter:

    wsl --install

    WSL single command install
    WSL single command install

Once you complete the steps, the required Linux components will install automatically on Windows 10 as well as the latest version of the Ubuntu Linux distribution.

Install Windows Subsystem for Linux 2 with preferred distro

If you prefer another flavor of Linux, the WSL2 command includes an option to view and select a different distro.

To install WSL2 with a specific distro, use these steps:

  1. Open Start on Windows 10.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to view a list of available distros and press Enter:

    wsl --list --online
    Quick note: At the time of this writing, you can install Ubuntu, Debian, Kali Linux, openSUSE, and SUSE Linux Enterprise Server.
  4. Type the following command to install the WSL 2 and press Enter:

    wsl --install -d DISTRO-NAME
    WSL install preferred distro command
    WSL install preferred distro command

    In the command remember to replace “DISTRO-NAME” for the name of the distro you want to install, such as Debian.

  5. Continue with the Linux distro setup as necessary.

After you complete the steps, the Windows Subsystem for Linux 2 components will install along with the distro of Linux you specified. 

Update Windows Subsystem for Linux 2 kernel

To update the WSL 2 kernel using Command Prompt, use these steps:

  1. Open Start.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to install the Windows Subsystem for Linux 2 and press Enter:

    wsl --update

    WSL kernel update command
    WSL kernel update command

Once you complete the steps, if an update is available, then it’ll download and install on your computer.

You can use these steps starting with Windows 10 build 20246 and higher releases. Everyone else is expected to get these changes with version 21H2.

Watch also the set up process in this video tutorial.