Windows Subsystem for Linux (wsl) - Get Default Version

WSL allows you to set the default version used by running wsl --set-default-version x (where x is the version to set the default to).

Is there any option to see what the current default version is? wsl --get-default-version is not recognized.


The WSL default version is stored in a registry entry.

The key is stored at HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss in an entry named DefaultVersion. The value can either be 1 or 2.

To read the value in PowerShell, you can use the following:

Get-ItemPropertyValue `
      -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss `
      -Name DefaultVersion

WSL allows you to set the default version used by running wsl --set-default-version x (where x is the version to set the default to).

The command wsl --set-default-version 2 only exists if you have Windows 10 version 2004 installed. If you have any other supported version installed, you cannot change the default version, since it doesn't support multiple versions.

Is there any option to see what the current default version is? wsl --get-default-version is not recognized.

You are attempting to run a command that does not exists. Instead, you should be be running, wsl --list --verbose

You can check the WSL version assigned to each of the Linux distributions you have installed by opening the PowerShell command line and entering the command (only available in Windows Build 19041 or higher): wsl --list --verbose

Source: Set your distribution version to WSL 1 or WSL 2


Run the "wsl --status" command to check

$ wsl --status