Last active
April 6, 2020 12:20
-
-
Save jez321/5606fff0374e94d3a726d51c78e269e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moving WSL path to a different drive/folder | |
1. Install WSL | |
2. List WSL installations | |
PS C:\WINDOWS\system32> wsl -l | |
Windows Subsystem for Linux Distributions: | |
Ubuntu (Default) | |
3. Export desired installation to a .tar file | |
PS C:\WINDOWS\system32> wsl --export Ubuntu S:\ISOs\ubuntu-wsl.tar | |
4. Unregister the installation | |
PS W:\VMs> wsl --unregister Ubuntu | |
Unregistering... | |
5. Register the installation to the new path | |
PS W:\VMs> wsl --import Ubuntu W:\VMs\ubuntu-wsl S:\ISOs\ubuntu-wsl.tar | |
6. Check that the installation was successfully registered | |
PS W:\VMs> wsl -l | |
Windows Subsystem for Linux Distributions: | |
Ubuntu (Default) | |
Changing the default user (after moving the path the default user will be root) | |
ubuntu config --default-user <user> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment