How to Install WSL2 in windows 10?

  • Post last modified:April 27, 2021
  • Reading time:3 mins read

If you are a person who wants to use Windows 10 and Linux both at the same time then this article will help you

Dual boot option, Virtual Box this method already tried but sometimes we need to use windows simultaneous for some work

Virtual Box usually lag if you have lower range of Laptop or Computer.

This article will show you the method for the WSL2. Due to some requirements if you are not able to use WSL2 then go to WSL1.

How to install WSL2

Requirements

x64 system based require Windows version 1903 or higher and the Build number 18362 or higher.

ARM64 system based require Windows Version 2004 or higher and the Build number 19041 or higher.

Before further proceeding, the check the windows version you can check the version using “winver“, Press the Windows key + R and type winver, and then enter.

If the version is lower than required then first update the windows then try to install WSL2.

Step 1.Enable the WSL

First, we will enable the Windows subsystem for Linux to enable this we have to type or copy-paste the code in the command prompt or PowerShell as an Administrator.

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

Step 2. Enable Virtual Machine

we have to enable the virtual machine

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

Now restart your system to complete setup.

Step 3. Download and Install Linux kernel Update Package

Download the package WSL2 Kernel Package for x64 Systems

After Downloading installs the package you will prompt for consent click OK.

Install WSL2 Package
Install WSL2 Package

Step 4. Set WSL2 as a Default

Now set the default version to WSL2

wsl --set-default-version 2

Step 5. Install Linux System

Now we will install the Linux distribution of your choice to download go to Microsoft store and search for distribution

Search Distribution
Search Distribution

In my case i’ll download Ubuntu 20.04 “focal” after download click on Launch.

Step 6.Setup the Distributions.

When you will launch the Linux distribution it will ask username and password to set for your distribution.

Set username and password
Set username and password

Now you are good to use the Linux in windows.

Check the Distribution
Check the Distribution

Conclusion

It is a pretty simple way to install WSL2, If any reasons you are not able to install first check the Windows version then only proceed.

Make sure to restart before installing the update package otherwise it will get fail to install.

If you are facing any difficulty to install WSL2 please post the comment we will try to resolve the issues.

Read this: How to make advanced Configuration in the UFW firewall?

Like what you read? Please share it with others.
guest
0 Comments
Inline Feedbacks
View all comments