Tuesday, February 4, 2020

WSL 2 move distro to another drive

https://github.com/MicrosoftDocs/WSL/issues/412

Run powershell.exe as Administrator
PS C:\WINDOWS\system32> wsl -l
Windows Subsystem for Linux Distributions:
Ubuntu (Default)

# mkdir S:\ISOs\

PS C:\WINDOWS\system32> wsl --export Ubuntu S:\ISOs\ubuntu-wsl.tar

# mkdir w:\VMs

PS C:\WINDOWS\system32> cd w:\VMs
PS W:\VMs> mkdir ubuntu-wsl
PS W:\VMs> wsl --unregister Ubuntu
Unregistering...
PS W:\VMs> wsl --import Ubuntu W:\VMs\ubuntu-wsl S:\ISOs\ubuntu-wsl.tar
PS W:\VMs> wsl -l
Windows Subsystem for Linux Distributions:
Ubuntu (Default)

No comments:

Post a Comment