By default, the Linux distribution is installed on your C: drive. If, like me, you have a D: drive with almost nothing on it, it can be really interesting to move Linux on that second drive.
To do this, please:
wsl --list --verbosefrom a PowerShell console; you'll get the name of your distribution (
Ubuntuin my case),
- From a PowerShell Admin console, run
wsl --terminate Ubuntuto stop our
- On your second drive, create a temporary folder like
wsl --export Ubuntu "D:\WSL\Ubuntu.tar",
- When finished, run
wsl --unregister Ubuntuand, finally,
wsl --import Ubuntu "D:\WSL\Ubuntu" "D:\WSL\Ubuntu.tar"
You will need to do this for every distribution you have installed and if you want to move it.
If you have Docker, you can do the same i.e. move the Docker partition to your second disk.