How to enable/install WSL 2

How to enable/install WSL 2

This article is for x64 machines

If you want to find out what kind of system you have type systeminfo | find "System Type" in PowerShell

If it says x64-based PC then this article is for you.


step 1:

Enable Windows Subsystem for Linux

You can enable these windows to feature by running this command.

Run this command in PowerShell or cmd as an admin.


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

Step 2:

Enable virtual machine feature

Run this command in PowerShell or cmd as an admin.


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

Restart your machine to complete the WSL install and update to WSL 2.


Step 3:

Download the Linux kernel update package

Download for x64 machines

Step 4:

Set WSL 2 as your default version


wsl --set-default-version 2

Step 5:

Install your Linux distribution of choice

Download Ubuntu or any other distro from the Microsoft Store. Now you can open Ubuntu from the start menu.


Did you find this article valuable?

Support Harshit Saini by becoming a sponsor. Any amount is appreciated!