WSL Default Version Registry Key in Windows
This article explains how to locate and modify the Windows Registry keys that manage the Windows Subsystem for Linux (WSL) configuration, including the default distribution and the WSL architecture version (WSL 1 vs. WSL 2). By navigating the Windows Registry Editor, users can view registered distributions, identify default settings, and manually adjust WSL version attributes.
The WSL Registry Path
The primary registry location responsible for managing installed WSL distributions and the default distribution is located under the user profile hive:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss
Key Registry Values Explained
Inside the Lxss key, several values and subkeys define
your WSL configuration:
1. DefaultDistribution
- Path:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss - Type:
REG_SZ(String Value) - Description: Contains the GUID (Unique Identifier)
of the default Linux distribution launched when running the
wslcommand without parameters.
2. Individual
Distribution Version (Version)
- Path:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss\{DISTRIBUTION-GUID} - Type:
REG_DWORD(DWORD 32-bit Value) - Value Data:
1= WSL 12= WSL 2
- Description: Controls the architecture version used by that specific distribution.
3. Distribution Name
(DistributionName)
- Path:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss\{DISTRIBUTION-GUID} - Type:
REG_SZ(String Value) - Description: Specifies the human-readable name of
the distribution (e.g.,
Ubuntu,Debian).
How to View and Modify the WSL Key in Regedit
Press
Win + R, typeregedit, and press Enter to open the Registry Editor.Navigate to:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\LxssTo change the default distribution, copy the GUID folder name of your target distribution and paste it into the
DefaultDistributionstring value.To change the WSL version for a specific distribution, open the corresponding GUID folder, double-click the
VersionDWORD value, and set it to1or2.Restart your WSL terminal session or run
wsl --shutdownvia PowerShell to apply the changes.