Renaming a WSL Distro

I Recently had the need to change the name of one of the Distro’s on my WSL Environment, this is the process I followed to rename it.

  1. Stop all instances of WSL

    wsl --shutdown
    
  2. Open Registry Editor and go to

    HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss
    
  3. Find the distro you want to rename, look for the key

    DistributionName
    
  4. Change the key DistributionName to the desired value

  5. Verify by running the following

    wsl -l -v
    

    This will list the running Distros