Distro management
Move a WSL distro
I prefer to have my WSL distro on a separate drive to keep my system drive small. If you want to do the same, you can move your distro as follows:
-
Create the target folder
I use e.g.
G:\WSL\Ubuntu-24.04
as target -
Shutdown WSL:
wsl --shutdown
-
Move the distro by issuing the command:
wsl --manage <DISTRO> --move <ZIEL>
If you do this directly after installing the WSL distro, it only takes a few seconds. You
will now find a file named ext4.vhdx
in the target directory.
You can continue working with WSL immediately; a restart of Windows is not necessary.
List installed distros
You can display the installed WSL distributions and their respective versions with:
wsl --list -v
Set standard distro
You can set your default WSL distro with (use the distro name from the list that the previous command generated):
wsl --set-default <DISTRO>