Enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS

WSL stands short for “Windows Subsystem for Linux”. It allows you to run a Linux environment directly on Windows, where you can use all command-line tools you know from Linux. In this step-by-step guide, I want to show you how you can set up a Linux environment on Windows 10.

Enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS

Since mid-2020, the new WSL version 2 is available, which represents a fundamental revision of the underlying architecture and enables better performance and speed.

Table of Contents

  1. Enable WSL
  2. Check if virtualization is enabled
  3. Enable Virtual Machine feature
  4. Restart machine
  5. Download the Linux kernel update package
  6. Set WSL 2 as default version
  7. Install a Linux distribution
  8. (Optional) Check WSL version assigned to Linux distributions

Prerequisites for WSL 2

You can check your OS Buildand System Typeby going to Settings > System > About

  • Windows 10 Pro
  • Have a x64 or ARM64 machine
  • For x64 systems: Version 1903 or higher, with Build 18362 or higher.
  • For ARM64 systems: Version 2004 or higher, with Build 19041 or higher.

If you have everything set up for WSL 2 (Virtual Machine feature enabled and Linux kernel update) and already a Linux distribution installed with WSL 1, you can go to step 8, where I show you how you can change the assigned version.

Enabling WSL 2

Before running WSL 2 we have to enable WSL 1 first (if you already have set up WSL 1 you can go to step 2).

1. Enable WSL

Open your PowerShell as an Administrator and run this command (you can find this command here in the official docs):

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

2. Check if virtualization is enabled

To enable the virtual machine feature (in step 3), your machine will require virtualization capabilities. You can check this in your Task Manager. In your CPU overview you can see if virtualization is enabled.

Enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS

Performance > CPU (in Task Manager)

If it is not enabled, you have to change your settings in the BIOS. You can easily start into your BIOS with the Advanced Startup feature (if you already have it enabled, you can skip here and go to step 3).

Go to Settings > Update & Security > Recovery and click Restart now under Advanced Startup. Windows will now restart into a recovery environment.

When being in recovery, you have to click Troubleshoot and then Advanced Options. The third screen you see will look like this:

Enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS

Third screen after clicking Troubleshoot > Advanced Options

Select UEFI Firmware Settings and your machine will boot into the BIOS. The BIOS looks different depending on your motherboard manufacturer.

You can check where to find the CPU settings by looking on your manufacturer’s homepage (common manufacturers are Asus, MSI, ASRock, Intel, …). You can get information about your motherboard by running this command in PowerShell:
wmic baseboard get product,Manufacturer,version,serialnumber

Enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS

Motherboard information output for an MSI motherboard

The CPU settings can probably be found under Processor, Chipset or Northbridge.
The setting to enable virtualization may be called VT-x, AMD-V, SVM, or Vanderpool. Enable Intel VT-d or AMD IOMMU if the options are available.

After enabling virtualization, you can save and reboot.

3. Enable Virtual Machine feature

Before installing WSL 2 you have to enable this feature. Open PowerShell as Administrator and run (this command can be found here in the official docs):

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

4. Restart machine

After running both commands, you have to restart your machine to complete the WSL install and update to WSL 2.

5. Download the Linux kernel update package

If you don’t know which architecture you have, you can check it in your settings (see instruction above under “Prerequisites for WSL 2”).

  • For x64: Download Link
  • For ARM64: Download Link

After downloading it, don’t forget to install it 😄

6. Set WSL 2 as default version

Open PowerShell and run this command:

wsl --set-default-version 2

7. Install a Linux distribution

You can search for a Linux distribution in the Microsoft Store. You can also install more than one distro and switch between them.

I would recommend installing Ubuntu, as the publisher Canonical worked together with Microsoft to develop WSL.

Open Microsoft Store: Ubuntu

Enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS

When you first start Ubuntu, you will be asked to create a user and a password. If you want, you can just type in the credentials you already use on your Windows login.

Enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS

Now you have everything set up and installed 🎉

8. (Optional) Check WSL version assigned to Linux distributions

With the command wsl -l -v in the PowerShell you can list all your Linux distros and check the version. The output looks like this:

Enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS

If you have everything set up for WSL 2 (Virtual Machine feature enabled and Linux kernel update) and a distro is still on version 1 you can easily update it with following command:

wsl --set-version <distribution name> <versionNumber>

So for example: wsl --set-version Ubuntu 2

Windows then automatically updates the assigned WSL version.

Here you can find out more about WSL:

How do you enable Virtualization is enabled in the BIOS?

How to enable Intel Virtualization Technology in BIOS?.
Turn on the computer..
Press F2 while the VAIO Logo appears during boot up..
In the BIOS page, go to Advanced tab by pressing the right arrow key..
In the Advanced Tab, users will be able to see the Intel Virtualization Technology option. ... .
Press Enter..

How do I enable Virtualization in Windows features?

Enable the Hyper-V role through Settings.
Right click on the Windows button and select 'Apps and Features'..
Select Programs and Features on the right under related settings..
Select Turn Windows Features on or off..
Select Hyper-V and click OK..

How do I enable Virtualization on a virtual machine?

Enabling Hardware Virtualization.
Reboot your Computer and Press the BIOS Key. ... .
Locate the section for CPU configuration. ... .
Find the Settings for Virtualization. ... .
Select the Option for Enabling Virtualization. ... .
Save the Changes You Have Made. ... .
Exit Your BIOS and Reboot Your Computer..

How do I enable Virtualization in BIOS for WSL2?

Enabling WSL 2.
Enable WSL. ... .
Check if virtualization is enabled. ... .
Enable Virtual Machine feature. ... .
Restart machine. ... .
Download the Linux kernel update package. ... .
Set WSL 2 as default version. ... .
Install a Linux distribution. ... .
(Optional) Check WSL version assigned to Linux distributions..