In this guide, we are going to show you how to install WSL2 on Windows 11 and Windows 10, and briefly discuss how it is better than WSL1. By the end of this post, you will be able to download, install, and run multiple Linux distributions on top of the Windows OS.
WSL1 VS WSL2
The Windows Subsystem for Linux version 2 superseded WSL1 because of its enhancements in certain areas of performance. However, some people still prefer using WSL1 for their testing and deployment purposes. The table below briefly highlights the features of both versions: With that, let us show you how to install WSL2 on your Windows PC.
Install WSL2 on Windows 11/10
Before we proceed to install WSL2, we must first confirm your OS version. If you are using Windows 11, or Windows 10 2004 or newer, then you can install WSL 2 using the regular method. However, if you are using Windows 10 version 1909 or older, then you must perform a manual WSL2 installation for which the method is given in the next section. Check your Windows version by typing in winver in the Run Command box. You must also have virtualization enabled on your computer. Check if your computer supports virtualization and then enable virtualization from the system BIOS. Once that is done, you may now proceed to install WSL2
Install WSL2 on Windows 11 and Windows 10 2004 or Newer
Follow these steps to install and run WSL2 on your Windows 11 or Windows 10 version 2004 (or newer) computers: When the computer reboots, you may see command-line windows to further configure the Linux distros. Enter the username and password for the user account on the distro(s) and continue as you may like. As you can see in the image above, there is an asterisk before “Ubuntu,” which signifies that Ubuntu is the default distro installed when a distro isn’t specified.
UbuntuDebianKali-LinuxSLES-12SLES-15Ubuntu 18.04 LTSUbuntu 20.04 LTSOracle Linux 8.5Oracle Linux 7.9
Note: If you are installing WSL2/Linux distro for the first time, the process might take longer, as Windows initially installed WSL2 and then the distro. Once WSL2 has been installed, you can then continue to install multiple Linux distros using Step 3 given below. You can use this cmdlet to install multiple different Linux distros simultaneously.
Install WSL2 on Windows 10 1909 or Older
If you are on Windows 10 version 1909 or older, then you will need to install WSL2 manually, but it can be done. You will need to perform the following processes in the given order: Let us now begin.
Enable Windows Features
Alternatively, you can also enable both of these Windows features using Windows PowerShell. Simply run the following cmdlets in an elevated PowerShell instance one after the other: Doing so will install WSL1. However, to upgrade to WSL2, you must install the kernel update package.
Update the Linux Kernel Package
Follow these steps to update the Linux kernel package:
Make WSL2 the Default Version
Now that WSL2 has been installed, it is time to make it the default WSL version. For that, simply run the following cmdlet in an elevated PowerShell instance: WSL2 Linux kernel update package for x64 machines WSL2 Linux kernel update package for ARM64 machines The upgrade process will now commence. Now, it is time to install your preferred Linux distro(s). You can also change the default WSL version by changing the integer from 2 to 1 in the command above.
Install Linux Distros
You must now install the Linux distribution(s) on top of WSL2. These can be installed from Microsoft Store. Here is how: The first time you launch the distribution, a console window will open and ask you to wait for a minute or two for files to de-compress and be stored on your PC. Wait for the window to close. When the Linux window opens, you’ll be asked to create a user account and enter the account name and set a password. Do the need full and you are good to use the distro.Configure username and password
Ubuntu 18.04 LTSUbuntu 20.04 LTSUbuntu 22.04 LTSopenSUSE Leap 15.1SUSE Linux Enterprise Server 12 SP5SUSE Linux Enterprise Server 15 SP1Kali LinuxDebian GNU/LinuxFedora Remix for WSLPengwinPengwin EnterpriseAlpine WSLRaft(Free Trial)
The Linux distribution will now be installed and ready to function.
Convert Existing Distro
This step is only required if you had previously installed a WSL1 Linux distribution. If you have just installed WSL2 using the given method above, you do not need to convert any distros to WSL2 as none would be installed on your computer at the moment. That said, if any specific WSL1 distro is installed, you can simply convert it to WSL2 by running the following cmdlet in an elevated Command Prompt: Replace [DistributionName] with the name of the distro. You can also change a distro from version 2 to 1 simply by changing the integer in the command above.
Check Installed WSL2 Distros and Versions
Finally, you need to check which distributions have been installed on your computer and what version they are (1 or 2). This can be done by running the following cmdlet: Alternatively, you can also use the “wsl -l -v” cmdlet.Check WSL installed and default distro If you find that one or more distros are not the right version, you can convert them using the given method above. Moreover, if you have a distro installed that is no longer required, you can uninstall it using the given method below. After having performed these steps, you should have functioning WSL2 distros installed on top of your Windows OS. Once WSL2 and its distros have been installed, there are a few things a user will need to know for its maintenance. Like updating the kernel, changing the default distro, and even uninstalling it.
Update Linux Kernel
The kernel is responsible for translating the tasks and commands from the software to the hardware, and vice versa. Therefore, keeping the Linux kernel updates is essential for getting the best performance. You can update your Linux kernel (if one is available) using this cmdlet in an elevated Command Prompt:
Change Default Distro
If you have more than one Linux distro installed, you can change it to any one of the installed distros. But before you do, we advise that you check which distros are currently installed and which one is the default one. To check that, run this cmdlet: The distro with the asterisk marks the default distro. To change it, run the following cmdlet while replacing [DistributionName] with the name of the distro you want to set as default: This will change the default Linux distro. To confirm, you can recheck the installed and default distro information, as in the image below.Change WSL default distro
Run Different WSL2 Distro without changing Default
The method given above will change your default Linux distro, and every time you run it, the selected distro would run automatically. However, you can also run a different distro without having to change the default distro. To run a specific Linux distro on WSL2, simply use the following cmdlet while replacing [DistributionName] with the name of the distro that you want to run:
Uninstall WSL2 Distro
From Command Prompt
If you wish to remove a Linux distro from your PC for whatever reason, you can use this cmdlet while replacing [DistributionName] with the name of the distro that you want to remove:
From Settings App
Alternatively, you can also remove a distro from the Settings app in Windows 11 and Windows 10. Here is how:
Uninstall WSL2 from Windows
If you feel like removing Windows Subsystem for Linux from your PC entirely, you can do so from the Settings app as well the Optional Features window.
In Windows 11:Settings app » Apps » Installed appsIn Windows 10:Settings app » Apps » Apps & features
From Settings App
From Optional Features
Alternatively, you can also remove WSL2 using the Optional Features window.
In Windows 11:Settings app » Apps » Installed appsIn Windows 10:Settings app » Apps » Apps & features
Note that disabling “Windows Subsystem for Linux” and “Virtual Machine Platform” alone will not eliminate the distros from your PC, and only removing the distros will not disable WSL2 from your computer.
Closing Thoughts
Windows Subsystem for Linux 2 is an excellent feature to have if you are a Windows user but need to perform the occasional Linux tasks. Although the Linux operating system offers more control and features since it is based on the Command Line Interface (CLI), some people prefer using the Windows operating system as it is more user-friendly. That said, WSL is the best option to get the best of both worlds. Also see:
How To Enable Hyper-V On Windows 10 (Home & Pro)How To Enable Hyper-V In Windows 11 (Home & Pro)How to Install And Check Python Version In Windows, Mac, & LinuxHow To Enable Virtualization In Windows 11/10How To Enable Nested Virtualization (VT-x) On Hyper-V, VMWare, VirtualBox VMs In Windows