New version

How to install WSL2 (Windows Subsystem for Linux 2) on Windows 10

Windows Subsystem for Linux 2 is now available on Windows 10 with various improvements, and this how you can install and start using it.

Windows Subsystem for Linux 2 on Windows 10

WSL2 (Windows Subsystem for Linux version 2) is a new version of the architecture that allows you to use Linux on top of Windows 10 natively (using a lightweight virtual machine), and it is meant to replace WSL1.

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

In this guide, you will learn the steps to install the Windows Subsystem for Linux 2 on Windows 10.

Install WSL2 on Windows 10

On Windows 10, WSL2 is supported on version 1903, 1909, 2004, 20H2, or higher, and the process to install it requires to enable WSL1, the Virtual Machine Platform, converting existing distros (if applicable), and configuring Windows Subsystem for Linux 2 as the new default for future distro installations.

If you have an ARM64 system, then the Linux integration is support on version 2004 and higher.

Also, starting with build 20150, the operating system includes new commands to simplify the installation process. If you are running a pre-release version of Windows 10, you can use these steps.

Enable Windows Subsystem for Linux 1

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

  1. Open Start on Windows 10.

  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 could not use the new architecture.

Enable Virtual Machine Platform

To enable the Virtual Machine Platform on Windows 10, use these steps:

Important: The motherboard and processor must support virtualization, and the option has to be enabled on the Basic Input/Output System (BIOS) or Unified Extensible Firmware Interface (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.

Enable Windows Subsystem for Linux 2

To start using WSL 2 or covert WSL 1 distros to WSL 2, use these steps:

  1. Download this WSL 2 kernel update (required).

  2. Double-click the wsl_update_x64.msi file and apply the update.

  3. Open Start.

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

  5. Type the following command to set 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
  6. (Optional) 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 distro’s name that you want to convert. If you do not 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. (See video tutorial.)

Confirm distro platform

To confirm distros are using the Windows Subsystem for Linux 2, use these steps:

  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 will know if the process has been completed successfully or if you need to troubleshoot any of the steps.

Update January 28, 2021: This guide was originally published in 2020, and it’s been revised to make the instructions are still relevant.