Open PowerShell as Administrator
In order to work on WSL, first shutdown (if nothing is running) wsl --shutdown wsl --manage debian --set-default-user root - Sets root as default in order to be able to change the password or other things on the regular account
Install distro without MS Store wsl --install -d debian
Get a list of distros wsl --list --online
Get a list of installed distros wsl --list
Move Distro to another location to save drive space (make the location first!) wsl --manage debian --move E:\WSL\Debian
Set default Distro wsl -s debian
- Revert sparse mode wsl --manage --set-sparse false
- Optimize the disk optimize-vhd -Path .vhdx -Mode full
- Set it back to sparse mode wsl --manage --set-sparse true
Reset the root password wsl -d debian -u root - Set distro to root user, if only one distro wsl -u root will work. pwsswd - use to change the password for root exit - exit wsl and return to windows
Remove a Distro that isn't visible in Settings>Apps>Installed apps - or any distro wsl --unregister debian - Removes the distro and the folder it was in
Backing up and Restoring Distros wsl --export <filename.tar> wsl --import </filename.tar>