Install a Distro to a different drive
First export your WSL distro a tar file using this command in PowerShell:
wsl --export <filename>
From there, using that file, import it back as a new distribution using this command in PowerShell:
wsl --import <DistroName> <InstallLocation> <FileName>
Make sure to choose an install location that’s under a new drive, and a useful distro name. Keep in mind that you won’t be able to access this distro using the classic distro launcher app anymore (as that is referencing the old distro stored on your C drive), you will instead need to run wsl -d <DistroName>
or you can set it as your default with wsl -s <DistroName>
and use wsl
to access this distro in the future.
You will need to be on Windows 10 version 1903 or higher to access this feature. Check out this blog post for more info.
- More from this author:
- craigaloewen
- craigloewen-msft
- Website