Where to Find WSL Configuration in Windows Registry
The Windows Subsystem for Linux (WSL) stores its per-user
configuration data, installed distribution metadata, and runtime
settings directly within the Windows Registry under the
Lxss registry key in HKEY_CURRENT_USER. This
article explains the exact registry path where WSL configurations
reside, breaks down the key data stored in each entry, and details how
Windows manages installed Linux distributions through the registry.
The WSL Registry Path
You can find all registered WSL distributions and user configurations
at the following path in the Registry Editor (regedit):
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss
Structure of the Lxss Registry Key
Under the main Lxss key, Windows manages the global
defaults and individual settings for every installed Linux
distribution.
1. Root Key Values
(\Lxss)
The base Lxss folder contains settings that apply across
your WSL environment:
- DefaultDistribution: A string (REG_SZ) containing
the Unique Identifier (GUID) of the default Linux distribution launched
when running the
wslcommand without parameters.
2. Distribution Subkeys
(\Lxss\{GUID})
Each installed WSL distribution is assigned a unique GUID subfolder
(for example, {a1b2c3d4-e5f6-7890-abcd-ef1234567890}).
Inside each subkey, you will find the following key values:
- DistributionName: The user-friendly name of the
distribution (e.g.,
Ubuntu,Debian,docker-desktop). - BasePath: The absolute file path to the
distribution’s storage location, where the virtual hard disk
(
ext4.vhdx) or root filesystem is stored. - DefaultUid: The user ID loaded by default upon
launch.
0x0(0) corresponds to therootuser, while0x3e8(1000) corresponds to the standard default user account. - Flags: A bitmask value controlling distribution behaviors, such as Windows interoperability, appending the Windows PATH variable, and automatic drive mounting.
- Version: Indicates whether the distribution runs on WSL 1 or WSL 2.
- State: An internal state code used by the subsystem to manage initialization and execution status.
How to Access and View the WSL Registry
- Press
Win + Rto open the Run dialog box. - Type
regeditand press Enter to launch the Registry Editor. - Paste
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxssinto the address bar at the top and press Enter. - Click on any of the GUID folders beneath
Lxssto inspect the settings for each specific installed distribution.