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.
All other answers were helpful, but can be other scenarios too, follow here as per yours. Mine was ubuntu 1604, so used following:-
ubuntu1604 config --default-user <username>
if you installed ubuntu 1804:-
ubuntu1804 config --default-user <username>
if you used default one, then:-
ubuntu config --default-user <username>
See which distros you have installed
I have Ubuntu and I wanted to set the default user to root
ubuntu config --default-user root