Correclty move WSL2 distro from default drive to another drive

DO NOT USE THE MOVE FUNCTION IN SETTINGS>APPLICATION

it will move into encrypted WindowsApps folder and cause a lot of WSL2 failure. exmpale

the correct way to do it is export then import.

  • check your distro name
wsl -l
适用于 Linux 的 Windows 子系统分发:
Ubuntu (默认)
docker-desktop
  • export your distro
wsl --export Ubuntu X:\wslbackup.tar
  • import your distro
wsl --import Ubuntu X:\WSL2\ X:\wslbackup.tar --version 2

get into your wsl distro and validate see if everything is working fine. then delete the backup tar.


评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注