Set Linux Distribution version to WSL1 or WSL2

WSL 2 (Windows Subsystem for Linux 2) is a new version of the architecture in WSL that changes how Linux distributions interact with Windows. WSL 2 has the primary goals of increasing file system performance and adding full system call compatibility. Each Linux distribution can run as WSL 1 or as WSL 2, and can be switched between at any time. WSL 2 is a major overhaul of the underlying architecture and uses virtualization technology and a Linux kernel to enable its new features. You can; Let’s take a look at the description of the process involved.

1] Set Default Linux Distribution version to WSL 1 or WSL 2 for New Linux Distributions

Do the following:

Press Windows key + X to open Power User Menu.Press A on the keyboard to launch PowerShell in admin/elevated mode.In the PowerShell console, type in the cmdlet below, as per your requirement and hit Enter.

Set WSL 1 as default version:

OR Set WSL 2 as default version:

2] Set Linux Distribution version to WSL 1 or WSL 2 for Specific Installed Linux Distributions

Do the following:

Press Windows key + X to open Power User Menu.Then press i on the keyboard to launch PowerShell.In the PowerShell console, type in or copy and paste the cmdlet below and hit Enter. Make note of the Linux distribution name you want to change the version (1 or 2) for.

Next, type the command below into PowerShell, and hit Enter. Substitute the (eg; Ubuntu) and placeholder with the actual Linux distribution name and the number 1 (WSL 1) or 2 (WSL 2) for the default version respectively from the verbose list. Your command should look something like this: You can now exit the PowerShell console. That’s it on how to set Linux Distribution version to WSL1 or WSL2 in Windows 11/10!