Set Linux Distro Version to WSL 1 or WSL 2 in Windows 10

Linux Store Icon Combined

How to Set a Linux distro version to WSL 1 or WSL 2 in Windows 10

Microsoft has ported WSL 2 to Windows 10 version 1909, and version 1903. Initially, it was exclusively available in Windows 10 version 2004. Now users who have installed two older releases of the OS can upgrade Windows Subsystem for Linux to the latest generation and get benefits from using it.

WSL 2 is a new version of the architecture that powers the Windows Subsystem for Linux to run ELF64 Linux binaries on Windows. This new architecture changes how these Linux binaries interact with Windows and your computer’s hardware, but still provides the same user experience as in WSL 1 (the current widely available version).

It ships a real Linux kernel with Windows that will make full system call compatibility possible. This is the first time a Linux kernel is shipped with Windows. WSL 2 uses the latest virtualization technology to run its Linux kernel inside of a lightweight utility virtual machine (VM).  In order to make it available for more Windows 10 users, Microsoft has made it available for two previous releases of the OS.

All its key features will be available, including

  • File system performance now on par with Mac and Linux speeds
  • Improved System Call Support for all Linux applications notably: Docker, FUSE, rsync, etc.
  • Full Linux kernel
  • Docker Desktop has added support to use WSL 2 as its engine

Builds 18362.1049 and 18363.1049 or higher are required to get WSL2 working. They are released with KB4571748.

You can set the desired WSL version to be used by default for new WSL instances, or set an installed distro to a specific WSL platform.

Set Linux Distro Version to WSL 1 or WSL 2 for new instances

  1. Open PowerShell as Administrator.
  2. To set WSL 2 as your default version for new instances, type and run: wsl --set-default-version 2.
  3. To set WSL 1 as your default version for new instances, type and run: wsl --set-default-version 1.
  4. You are done.

Note: Some of the legacy WSL distros are not designed to run under WSL 2. You need to uninstall them manually. Here is the list of WSL 2 -compatible distros.

Well, you can instead to convert an existing distro to version 1 or 2. Here's how to find WSL versions for your installed distros.

Find WSL Versions for Installed Linux Distros

  1. Open PowerShell as Administrator.
  2. Run the command: wsl --list --verbose.
  3. See the 'version' column value.

You are done.

Finally, here's how to change the WSL version for a distro.

To Set Linux Distro Version to WSL 1 or WSL 2 in Windows 10,

  1. Open PowerShell as Administrator.
  2. To set WSL 2 as the distro version for the specific instance, run the command wsl --set-version <distro_name> 2.
  3. Substitute the <distro_name> portion with the actual Linux name you are using, e.g. Ubuntu: wsl --set-version Ubuntu 2.
  4. To convert a distro to WSL 1, issue the command wsl --set-version <distro_name> 1, e.g. for Ubuntu run: wsl --set-version Ubuntu 1.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

7 thoughts on “Set Linux Distro Version to WSL 1 or WSL 2 in Windows 10”

  1. when i was converting kali to wsl 2 , it is taking 1 to 2 hr and then i was very irritated and then i closed it.
    please solve this. your website is really helpful

  2. #WSL2 network issues: Ubuntu cannot resolve names for Internet IP.
    PS C:\WINDOWS\system32> wsl -l -v
    NAME STATE VERSION
    * Ubuntu Stopped 2
    #Convert WSL2 to original WSL1 for Ubuntu to solve internet issues.
    PS C:\WINDOWS\system32> wsl –set-version ubuntu 1
    PS C:\WINDOWS\system32> wsl -l -v
    NAME STATE VERSION
    * Ubuntu Running 1

  3. wsl –set-version Ubuntu 2
    There is no distribution with the supplied name.
    Error code: Wsl/Service/WSL_E_DISTRO_NOT_FOUND

    YOU ARE RETARDED ?!? OR WHAT ?!?

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.