Each installed WSL distribution gets its own GUID subkey under HKCU\...\Lxss. Listing subkeys shows all installed distributions: Get-ChildItem "HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss".
The BasePath value points to the directory containing ext4.vhdx — the virtual disk holding the Linux filesystem. Do not move this manually.
WSL2 distributions run in a lightweight Hyper-V VM; the VM state is managed by LxssManager service, not user registry values.
The wsl.conf file inside each distro (/etc/wsl.conf) overrides some distribution-level settings (default user, mount options, interop) — these take precedence over the registry.
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss is used for system-wide WSL settings; per-user distros are always under HKCU.
⚠️ Deleting a distribution's registry subkey without unregistering it first (wsl --unregister <Distro>) can orphan the VHD file on disk.
🗑️ Cleanup
# List all installed distributions firstwsl--list--verbose# Properly unregister a distribution (removes registry key + VHD)wsl--unregisterUbuntu-22.04# If registry key is orphaned (no corresponding distro), remove directly# WARNING: This will NOT clean up the VHD file — delete BasePath manuallyGet-ChildItem"HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss"|Where-Object{$_.GetValue("DistributionName")-eq"Ubuntu-22.04"}|ForEach-Object{Remove-Item$_.PSPath-Recurse-Force}