pxlrbt / move-wsl

Easily move your WSL distros VHDX file to a new location.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Default user switch

B1ack3ye opened this issue · comments

Describe the bug
I tried to change the default username back to the old username, which did not work with the instructions in the readme. But what worked is in Powershell the command <DistributionName> config --default-user <username>.

Example: ubuntu config --default-user johndoe

Of course you should shutdown WSL before that - wsl --shutdown

I found it easier than creating a config file and putting the username there. Maybe you could change that in the readme.

There a two reasons I chose the config way:

  1. It's permanent. Even after moving the distro again.
  2. Not all distros have their own command. So the config is more universal.

I added your suggestion to the readme as an alternative.