Microsoft introduced the second version of the Linux Subsystem in the latest version 2004 of Windows 10. The WSL 2 allows Linux to run natively using a lightweight Virtual Machine on top of Windows 10 and is a significant step up from the OG WSL, which didn’t include the Linux kernel.
JOIN OUR TELEGRAM COMMUNITY ????
Apart from that, WSL 2 also brings a host of features. Increased file I/O performance, Socket Performance, etc. However, installing WSL 2 could be a little tricky if you’re not that familiar with how different terminals work. In this article, we’ll be guiding you with the easiest way to install WSL 2 on Windows 10.
Here’s Are The Steps To Install WSL 2 On Windows 10
Enabling Windows Subsystem For Linux
To prepare your computer for WSL 2, you need to type the following command.
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Enable The ‘Virtual Machine Platform’ Optional Component
Installing the Virtual Machine Platform component is a necessary step before going ahead and installing WSL 2. Type the following command in the Windows Powershell or Command Prompt.
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
After executing the command by pressing enter, restart your computer.
ALSO READ: Here Are 2 Easy Ways To Install Linux On Chromebook
After the restart, open up the Windows Powershell yet again as an administrator (right-click on the Powershell icon and run as administrator). Enter the following command.
wsl --set-default-version 2
This will set the recently installed WSL 2 as default.
You might see the message “WSL 2 requires an update to its kernel component. For information, please visit https://aka.ms/wsl2kernel.” If you do, then all you need to do is visit the website and download a .msi file, which is a Linux kernel file and install it. The installation process is reasonably self-explanatory, and we’re not going to dig deeper into it.
Installing A Linux Distribution Of Your Choice
Installing a Linux Distribution of your choice is relatively simple. All you need to do is.
- Go to Microsoft Store and search for Linux in the search box.
Note: If you’re new to Linux, then you should be looking at downloading Ubuntu distributions (preferably Ubuntu 18.04 LTS) because of the high stability and extreme user-friendliness.
2. Done selecting the distro? Download it and give it some time to install.
3. Open up the newly installed distro, set it up, and you’re ready to rock.
4. Set your WSL version to WSL 2 and to do it, open the Windows Powershell and enter the following commands
wsl --list --verbose
This command will list the distributions which are currently installed. If you find the one that you installed, you’re good to go.
To set the distribution, type the following command.
wsl --set-version <distribution name> <versionNumber>
Replace the “distribution name” (Example: Ubuntu-18.04) and the “versionNumber”(Example: 2) with the actual distro name and the version number of WSL.
ALSO READ: Top 5 Linux Distros That Offer Cutting Edge Updates 
The Final Step
Set the newly set up distro as default by using the following command.
wsl --set-default-version 2
If you made it till here, then, voila! You’ve successfully installed WSL 2. To check if it works, just type wsl in the Command Prompt or Windows Powershell.
So, this is how you install WSL 2 on Windows 10. If you installed it successfully, do let us know what you like about WSL and if you face any problem while installing WSL 2 in the comments section below.