MicrosoftWindowsWindows 11
The Windows operating system allows you to run a lightweight Linux distribution on top of itself.
This feature is known as Windows Subsystem for Linux, or WSL.
It has 2 versions: WSL1 (WSL) and WSL2.

However, some people still prefer using WSL1 for their testing and deployment purposes.
Source:Microsoft
With that, let us show you how to install WSL2 on your Windows PC.
Check your Windows version by typing inwinverin the Run Command box.

WSL1 VS WSL2. Source:Microsoft
If you wish toinstall a specific distro, you might use the-dswitch to specify it in the following cmdlet.
When the Linux distros are installed, reset your machine for the changes to take effect.
When the computer reboots, you may see command-line windows to further configure the Linux distros.

Install default WSL distro
You will need to perform the following processes in the given order:
Let us now begin.
The features will now install.
When the installation completes, restart the computer for the changes to take effect.

Install specific WSL distro
Alternatively, you might also enable both of these Windows features usingWindows PowerShell.
Simply launch the following cmdlets in anelevated PowerShell instanceone after the other:
Doing so will install WSL1.
However, to upgrade to WSL2, you must roll out the kernel update package.

Configure username and password
You will now see the installation wizard.
On the first screen, clickNext.Proceed with Linux kernel update
The upgrade process will now commence.
You must now drop in the Linux distribution(s) on top of WSL2.

Enable features from Optional Features
These can be installed from Microsoft Store.
The Store app will now run with the respective distro page displaying.
ClickGetto begin the installation.Install Linux distro
The Linux distribution will now be installed and ready to function.

Enable features using PowerShell
Wait for the window to close.
After having performed these steps, you should have functioning WSL2 distros installed on top of your Windows OS.
Like updating the kernel, changing the default distro, and even uninstalling it.

Proceed with Linux kernel update
Therefore, keeping the Linux kernel updates is essential for getting the best performance.
To check that, run this cmdlet:
The distro with the asterisk marks the default distro.
However, you’re able to also run a different distrowithouthaving to change the default distro.

Close wizard
Here is how:
Navigate to the installed apps page.
Here, search for Windows Subsystem for Linux, punch it to expand more options, and then clickUninstall.
If asked, restart the computer.

Set WSL2 as the default version
That said, WSL is the best option to get the best of both worlds.
0
Get weekly insights, tips and exclusive content delivered straight to your inbox.
Talk to us straight and get your questions answered right away

Get Linux distro in Store

Open Store

Install Linux distro

Change WSL distro version

Check WSL installed and default distro

Update Linux kernel

Check WSL installed and default distro

Change WSL default distro

Run specific WSL distro without changing default

Uninstall a Linux distro

Uninstall distro from Settings app

Uninstall WSL2 from Settings app

Disable optional features

Restart computer



source: www.itechtics.com