I'm trying to move my WSL2 "distribution" to another hard drive with more space. I've performed the following:
wsl --export Ubuntu-20.04 ubuntu-20_04-export.tar wsl --import Ubuntu-20.04-reimported D:\tools\wsl-ubuntu-20_04 .\ubuntu-20_04-export.tar
and I've changed my WinTerm configuration to set the new distro as the default profile. I've also set the distro as the default distro with
wsl -s. And I've unregistered the old distro. But when I start up the new WSL distro in WinTerm, it now signs me in as root. As in this question, I've tried to run the following:
ubuntu2004.exe config --default-user <existing-user-name>
But new sessions started with WinTerm still start as root by default.
ubuntu2004.exe doesn't seem to affect the new distro but instead installs yet another distro in order to set the default user there. The following works fine with the new distro:
wsl -u <existing-user-name>
But how do I change the default user of the new distro?