New version

How to install Windows Subsystem for Linux 2 on Windows 10

Windows Subsystem for Linux 2 is coming to Windows 10, and this how you can start using it.

Windows Subsystem for Linux 2 on Windows 10 20H1

On Windows 10, as part of the 20H1 development, Microsoft is introducing the Windows Subsystem for Linux version 2 (WSL 2), which is a new a version of the architecture that allows to run Linux on top of Windows 10 natively (using a lightweight virtual machine), and it’s meant to eventually replace WSL 1.

In this new version, the feature runs a real Linux kernel that will improve performance and app compatibility over the previous version while maintaining the same experience as the first version.

While the second version of the Windows Subsystem for Linux is expected to arrive with the release of the Windows 10 20H1 update, if you’re a participant of the Windows Insider Program, you can enable the experience in the latest preview of Windows 10.

In this guide, we’ll walk you through the steps to install the Windows Subsystem for Linux 2 on Windows 10 20H1 (build 18917 or later).

How to install WSL 2 on Windows 10 20H1

The Windows Subsystem for Linux 2 comes built into Windows 10, but you need to follow a few steps to start using it, including enabling WSL 1, the Virtual Machine Platform, converting existing distros and setting WSL 2 a new default for future Linux distros installations.

Enabling Windows Subsystem for Linux 1

If you’re not already using Linux on Windows 10, you must enable the Windows Subsystem for Linux version 1 with these steps:

  1. Open Start.

  2. Search for Turn Windows features on or off and click the top result to open the experience.

  3. Check the Windows Subsystem for Linux option.

    Enable WSL 1 on Windows 10
    Enable WSL 1 on Windows 10
  4. Click the OK button.

  5. Click the Restart button.

Once you complete the steps, you need to enable the Virtual Machine Platform feature. According to Microsoft, this is an optional step, but without the virtualization feature enabled, I was not able to use the new architecture.

Enabling ‘Virtual Machine Platform’

Use these steps to enable the Virtual Machine Platform on Windows 10:

Important: Your motherboard and processor must support virtualization, and the option has to be enabled on the BIOS/UEFI.
  1. Open Start.

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

  3. Type the following command to enable the Virtual Machine Platform feature and press Enter:

    Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

    Enable Virtual Machine Platform on Windows 10 using PowerShell
    Enable Virtual Machine Platform on Windows 10 using PowerShell
  4. Restart your computer.

After you complete the steps, you can set the Windows Subsystem for Linux version 2 the new default architecture and convert existing distros.

Enabling Windows Subsystem for Linux 2

Use these steps to start using WSL 2 or covert WSL 1 distros to WSL 2:

  1. Open Start.

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

  3. Type the following command to make Windows Subsystem for Linux 2 your default architecture for new distros that you install and press Enter:

    wsl --set-default-version 2

    Enable WSL 2 on Windows 10 20H1
    Enable WSL 2 on Windows 10 20H1
  4. Type the following command to convert the distro from WSL 1 to WSL 2 and press Enter:

    wsl --set-version Ubuntu 2
    Convert distro WSL 1 to WSL 2 on Windows 10 20H1
    Convert distro WSL 1 to WSL 2 on Windows 10 20H1

    In the command, make sure to change Ubuntu for the name of distro that you want to convert. If you don’t know the name, you can use the wsl -l -v command.

Once you complete the steps, your device will start using the new version of Windows Subsystem for Linux as the default architecture.

Verifying distro platform

Use these steps to confirm that your distros are using the Windows Subsystem for Linux 2:

  1. Open Start.

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

  3. Type the following command to verify the version of the distro and press Enter:

    wsl --list --verbose
  4. Confirm the version of the distro version is set to 2.

    Check distro using Windows Subsystem for Linux 2 on PowerShell
    Check distro using Windows Subsystem for Linux 2 on PowerShell

After you complete the steps, you’ll know if the process has been completed successfully or if you need to troubleshoot any of the steps.