When I first installed and ran Windows Linux Subsystem, console askded me to enter a new user name for bash. I input User
. Now when I start bash in my console my username and PC name appeared at the beginning of the prompt, like
User@DESKTOP-TPQIRNP:/mnt/...
What should I do if I want to change my username for bash console? And PC name
Best Answer
According to therobyouknow's comment,
LxRun.exe
is deprecated now.Please refer to Mitchell Van Manen's answer if you're using the new version of subsystem.
====================================================================
You should use
LxRun.exe
command locating inC:\WINDOWS\system32
.Here are two solutions, which are all run in
cmd.exe
instead ofbash
.Use the command below to create a new user and set it as the default user:
OR Uninstall Linux subsystem fully and reinstall it
The next time you reenter bash, it will prompt you to input username.