How to Rename WSL Distros on Windows
Sometimes, it's convenient to rename your WSL (Windows Subsystem for Linux) distros for better identification. Renaming a distro makes it easier to manage multiple distributions. Follow these steps to rename a WSL distro:
Step 1: Stop All Running WSL Instances
Before making any changes, stop all running instances of WSL.
wsl --shutdown
Step 2: Open the Registry Editor
Open the Registry Editor
by searching for it in the Start menu.
Step 3: Navigate to the WSL Distro Registry
In the Registry Editor
, navigate to the following path:
Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss
Each subfolder under Lxss
represents a different WSL distro.
Step 4: Find and Edit the DistributionName
Open the subfolder corresponding to the distro you want to rename. You'll find a value called DistributionName
. This is the current name of your distro.
Step 5: Rename the Distro
Double-click DistributionName
and change it to your desired name. Click "OK" to confirm.
Step 6: Restart Your Computer
After making the changes, restart your computer to apply them.
Step 7: Verify the Changes
Once your computer has restarted, run the following command to see the updated distro name:
wsl -l
Your renamed distro should now appear in the list of available distros.
All set! Your WSL distro has been successfully renamed.