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.
users windows-subsystem-for-linux
add a comment |
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.
users windows-subsystem-for-linux
add a comment |
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.
users windows-subsystem-for-linux
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.
users windows-subsystem-for-linux
users windows-subsystem-for-linux
edited Dec 16 '16 at 23:47
JohnDoea
30102260
30102260
asked Aug 25 '16 at 13:32
mlevitmlevit
164113
164113
add a comment |
add a comment |
5 Answers
5
active
oldest
votes
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
add a comment |
You can change the default user for bash by running the following command in a normal command prompt (cmd.exe):
LxRun.exe /setdefaultuser <new_name>
add a comment |
If you're running Ubuntu 18.04 from the Microsoft Store, the command (powershell or cmd) will be:
ubuntu1804 config --default-user <username>
add a comment |
All other answers were helpful, but can be other scenarios too, follow here as per yours. Mine was ubuntu 1604, so use 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>
add a comment |
In CMD
See which distros you have installed
wslconfig /l
I have Ubuntu and I wanted to set the default user to root
ubuntu config --default-user root
Documentation:
https://docs.microsoft.com/en-us/windows/wsl/user-support
Why nominate to delete?
– spaceNeenja
Jan 22 at 4:46
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f816732%2fhow-to-change-default-user-in-wsl-ubuntu-bash-on-windows-10%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
add a comment |
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
add a comment |
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
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
edited Nov 5 '18 at 20:33
Community♦
1
1
answered Oct 20 '17 at 0:56
KDExKDEx
28124
28124
add a comment |
add a comment |
You can change the default user for bash by running the following command in a normal command prompt (cmd.exe):
LxRun.exe /setdefaultuser <new_name>
add a comment |
You can change the default user for bash by running the following command in a normal command prompt (cmd.exe):
LxRun.exe /setdefaultuser <new_name>
add a comment |
You can change the default user for bash by running the following command in a normal command prompt (cmd.exe):
LxRun.exe /setdefaultuser <new_name>
You can change the default user for bash by running the following command in a normal command prompt (cmd.exe):
LxRun.exe /setdefaultuser <new_name>
answered Aug 26 '16 at 11:13
William BowlingWilliam Bowling
1312
1312
add a comment |
add a comment |
If you're running Ubuntu 18.04 from the Microsoft Store, the command (powershell or cmd) will be:
ubuntu1804 config --default-user <username>
add a comment |
If you're running Ubuntu 18.04 from the Microsoft Store, the command (powershell or cmd) will be:
ubuntu1804 config --default-user <username>
add a comment |
If you're running Ubuntu 18.04 from the Microsoft Store, the command (powershell or cmd) will be:
ubuntu1804 config --default-user <username>
If you're running Ubuntu 18.04 from the Microsoft Store, the command (powershell or cmd) will be:
ubuntu1804 config --default-user <username>
answered Sep 26 '18 at 15:39
rainabbarainabba
1113
1113
add a comment |
add a comment |
All other answers were helpful, but can be other scenarios too, follow here as per yours. Mine was ubuntu 1604, so use 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>
add a comment |
All other answers were helpful, but can be other scenarios too, follow here as per yours. Mine was ubuntu 1604, so use 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>
add a comment |
All other answers were helpful, but can be other scenarios too, follow here as per yours. Mine was ubuntu 1604, so use 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>
All other answers were helpful, but can be other scenarios too, follow here as per yours. Mine was ubuntu 1604, so use 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>
answered Jan 19 at 3:57
kakabalikakabali
1012
1012
add a comment |
add a comment |
In CMD
See which distros you have installed
wslconfig /l
I have Ubuntu and I wanted to set the default user to root
ubuntu config --default-user root
Documentation:
https://docs.microsoft.com/en-us/windows/wsl/user-support
Why nominate to delete?
– spaceNeenja
Jan 22 at 4:46
add a comment |
In CMD
See which distros you have installed
wslconfig /l
I have Ubuntu and I wanted to set the default user to root
ubuntu config --default-user root
Documentation:
https://docs.microsoft.com/en-us/windows/wsl/user-support
Why nominate to delete?
– spaceNeenja
Jan 22 at 4:46
add a comment |
In CMD
See which distros you have installed
wslconfig /l
I have Ubuntu and I wanted to set the default user to root
ubuntu config --default-user root
Documentation:
https://docs.microsoft.com/en-us/windows/wsl/user-support
In CMD
See which distros you have installed
wslconfig /l
I have Ubuntu and I wanted to set the default user to root
ubuntu config --default-user root
Documentation:
https://docs.microsoft.com/en-us/windows/wsl/user-support
edited Jan 22 at 4:45
answered Jan 21 at 19:54
spaceNeenjaspaceNeenja
73
73
Why nominate to delete?
– spaceNeenja
Jan 22 at 4:46
add a comment |
Why nominate to delete?
– spaceNeenja
Jan 22 at 4:46
Why nominate to delete?
– spaceNeenja
Jan 22 at 4:46
Why nominate to delete?
– spaceNeenja
Jan 22 at 4:46
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f816732%2fhow-to-change-default-user-in-wsl-ubuntu-bash-on-windows-10%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown