I've imported a WSL image I had exported from WSL previously (wsl --import UbuntuTest ./UbuntuImport .\UbuntuSnapshot201011
).
My distro has been correctly installed as UbuntuTest
. However, when I log into it with wsl -d UbuntuTest
the default user is root, and not roemerco
. I would like to change it, so that I can login just with wsl -d UbuntuTest
not needing the CLI option -u roemerco
in addition.
Apparently, for many users, it's possible to change default users by running a command like ubuntu config --default-user <username>
(see How to change default user in WSL Ubuntu bash on Windows 10). However, this doesn't work in my case. Neither on CMD nor Powershell is ubuntu
or ubuntu2004
a recognised command. This may be, because I haven't installed the distro through the Microsoft Store.
Does anyone have any thoughts? I tried to find stuff in the WSL docu, but couldn't find anything about it. Is this a missing feature or bug?
ubuntu2004
command doesn't exist. – Cornelius Roemer Oct 13 '20 at 19:17CMD
andPS
, neither works:'UbuntuTest' is not recognized as an internal or external command, operable program or batch file.
andUbuntuTest : The term 'UbuntuTest' is not recognized as the name of a cmdlet, function, script file, etc.
– Cornelius Roemer Oct 13 '20 at 20:20