Ubuntu – How to change default user in WSL Ubuntu bash on Windows 10


I installed the WSL Bash on Windows 10 and set my user to e.g. 'abc' but now I want to change it to something else.

How can I change the user name of the user I'm logged in as?

When I open bash it automatically logs me in with my current user.

Best Answer

  • Now that LxRun.exe is deprecated, if you install Ubuntu from the Windows store the command you will need is

    ubuntu config --default-user <username>

    Restart LxssManager service

    sc stop LxssManager
    sc start LxssManager
  • Related Question