Single command

How to install Windows Subsystem for Linux with one command on Windows 10

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

WSL 2 quick install using command

Although the installation of the Windows Subsystem for Linux 2 is not a difficult process on Windows 10, it takes a few steps, even more if you also want to set version 2 as the default.

In future updates, Microsoft is planning to simplify the installation process to a single command line that will enable the Windows Subsystem for Linux components, virtual machine platform, and it’ll prompt to restart to complete the setup.

Also, the company is making the WSL 2 the new default on Windows 10, which further reduces the steps to set up the environment. Furthermore, there is a new command to makes it easier to install future kernel updates.

In this guide, you’ll learn the easy steps to install the Windows Subsystem for Linux platform on your device. In addition, we’ll outline steps to update the Linux kernel on Windows 10.

Install Windows Subsystem for Linux 2 components

To quickly install WSL 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 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. The last thing left to do is to download and install the Linux distro that you want to run.

Update Windows Subsystem for Linux 2 kernel

To update the WSL 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

After you complete the steps, if an update is available, the it’ll download and install on your device.

You can use these steps starting with Windows 10 build 20150 and higher releases, and everyone else may get these changes presumably with version 21H1. At the time of this writing, if prompted, you may need to download and install an kernel update manually to run WSL 2.