HOW-TO: Rename WSL Distro Name
Related
Overview
As of WSL2 in Windows 10 Build 2004, there is no CLI command from PowerShell to rename the Linux Distribution Name. Here's how to do it easily using Registry Editor.
Having said that, this is an easy (and as far as I can see harmless) hack using the Registry editor:
I renamed the distro by changing the following key:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss{xxxxxxxxx-YOUR-GUID-HERE-xxxxxxxx}\DistributionName
Step-by-Step
- Stop all instances of WSL
- Open Registry Editor and go to
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss
- Find the distro you want to rename, look for het key
DistributionName
- Change the key
DistributionName
to the desired value - Start WSL again and browse to
\\wsl$
to find your renamed distro, or executewsl.exe -v -l