Answers for "how to move wsl storage"

0

how to move wsl storage

Example for moving to D:WSLUbuntu

Step 1. Install Ubuntu in the store. 
Launch it to initialize the default instance.
Create the user used in Ubuntu as prompted.


Step 2. Export the instance and import into the target directory.

cd D:
mkdir WSL
cd WSL
wsl --export Ubuntu ubuntu.tar
wsl --unregister Ubuntu
mkdir Ubuntu
wsl --import Ubuntu Ubuntu ubuntu.tar

Step 3. Set the default user for the moved Ubuntu.
Find the directory in registry 
HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionLxss 
which DistributionName is “Ubuntu”. Set its DefaultUid to decimal 1000 (or hex 3e8).

Step 4. Try wsl

wsl -d Ubuntu
Posted by: Guest on February-21-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language