Skip to content

Commit 2d88214

Browse files
committed
Merge branch 'master' of github.com:pxlrbt/move-wsl into master
2 parents 8557adb + bcedef6 commit 2d88214

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Move WSL
22

3-
Bash, batch and PowerShell script to move WSL 2 distros VHDX file to a different location.
3+
Bash, batch and PowerShell script to move WSL 1 and WSL 2 distros VHDX file to a different location.
44

55
![Interactive Example](screencast.gif)
66

@@ -36,18 +36,22 @@ _This is a lightweight version_ which can also be used from Windows CMD.
3636

3737
__Example:__ `move-wsl.bat docker-desktop "D:\wsl files\docker"`
3838

39+
## Moving Docker WSL
40+
41+
Before moving Docker WSL make sure to stop the Docker service. Otherwise Docker will crash and you may need to reset it to factory defaults.
42+
3943
## FAQ
4044

4145
### Default user was switched to root when moving a distro
4246

43-
Set your default user inside your distro by adding this to your `/etc/wsl.conf`
47+
Set your default user inside your distro by adding the following configuration to your `/etc/wsl.conf`.
4448

4549
```ini
4650
[user]
4751
default=YOUR_USERNAME
4852
```
4953

50-
Then exit your distro, terminate it (`wsl -t YOUR_DISTRO`) and start it again.
54+
If the file doesn't exist create it manually. Then exit your distro, terminate it (`wsl -t YOUR_DISTRO`) and start it again. For further options see [Microsoft Docs](https://docs.microsoft.com/en-us/windows/wsl/wsl-config#user).
5155

5256
### Standard distro switched when moving it
5357

@@ -56,3 +60,8 @@ Since we need to unregister to import it with the same name, the standard distro
5660
```sh
5761
wsl -s YOUR_DISTRO
5862
```
63+
64+
### WSL version was switched when moving distro
65+
66+
On import the distro will be registered with the current default WSL version. You can set your default WSL version with `wsl --set-default-version <Version>`.
67+
When the WSL version was accidentally changed while moving, you can set the version with `wsl --set-version <Distro> <Version>`.

0 commit comments

Comments
 (0)