How to change the default user name in WSL?How to finish an aborted Ubuntu subsystem initialization?How do I...
How to prevent z-fighting in OpenSCAD?
bldc motor, esc and battery draw, nominal vs peak
Alignment of various blocks in tikz
Can someone publish a story that happened to you?
Betweenness centrality formula
How would 10 generations of living underground change the human body?
How to display Aura JS Errors Lightning Out
"You've called the wrong number" or "You called the wrong number"
Pre-plastic human skin alternative
I preordered a game on my Xbox while on the home screen of my friend's account. Which of us owns the game?
Which big number is bigger?
How to not starve gigantic beasts
Was there a shared-world project before "Thieves World"?
Is Diceware more secure than a long passphrase?
Initiative: Do I lose my attack/action if my target moves or dies before my turn in combat?
Is there really no use for MD5 anymore?
How to write a column outside the braces in a matrix?
How do I reattach a shelf to the wall when it ripped out of the wall?
How come there are so many candidates for the 2020 Democratic party presidential nomination?
Does tea made with boiling water cool faster than tea made with boiled (but still hot) water?
can anyone help me with this awful query plan?
Minor Revision with suggestion of an alternative proof by reviewer
A Note on N!
Extension of 2-adic valuation to the real numbers
How to change the default user name in WSL?
How to finish an aborted Ubuntu subsystem initialization?How do I change the language of the Linux subsystem in Windows 10 (WSL)?Windows 10 Linux Subsystem How to Change User Name and PC Name for Bash ConsoleHow can I “open” a file from WSL with the default application?WSL — Where did the SSH go?Unable to resolve host name in WSLHow do I launch Windows Explorer from the WSL Bash command line?How to get the host user home directory in WSL BashHow to run init.d scripts on Windows WSL?How to change the dark blue in wsl to something brighter?How do I configure which Linux distribution WSL uses?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
Many websites says I should use lxrun /setdefaultuser
, but this command is deprecated:
C:WINDOWSsystem32>lxrun /setdefaultuser foo
Warning: lyrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution.
How can I change the default username which is in my case root
. I would like it to be the same username as I use with my Windows account.
Btw I am using mintty to run WSL:
%LOCALAPPDATA%wslttybinmintty.exe --WSL= -h err --configdir="%APPDATA%wsltty" -~
windows-subsystem-for-linux
|
show 1 more comment
Many websites says I should use lxrun /setdefaultuser
, but this command is deprecated:
C:WINDOWSsystem32>lxrun /setdefaultuser foo
Warning: lyrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution.
How can I change the default username which is in my case root
. I would like it to be the same username as I use with my Windows account.
Btw I am using mintty to run WSL:
%LOCALAPPDATA%wslttybinmintty.exe --WSL= -h err --configdir="%APPDATA%wsltty" -~
windows-subsystem-for-linux
Could be but there is no/setdefaultuser
option :(
– nowox
Nov 9 '17 at 12:32
@Ramhound: Why did you post a bounty when your own answer is accepted?
– harrymc
Jan 22 '18 at 15:24
@Ramhound: I have the exact same question :)
– nowox
Jan 22 '18 at 15:27
Does the accepted answer solve your issue?
– nowox
Jan 22 '18 at 15:45
@Ramhound: What do you expect to achieve? Do you intend to never award the bounty, so nobody gets more than half the bounty and that also only if at least two voters happen to like the answer in the next 5-6 days? You know well that most voters will only look at the accepted answer and go away uninterested.
– harrymc
Jan 22 '18 at 16:28
|
show 1 more comment
Many websites says I should use lxrun /setdefaultuser
, but this command is deprecated:
C:WINDOWSsystem32>lxrun /setdefaultuser foo
Warning: lyrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution.
How can I change the default username which is in my case root
. I would like it to be the same username as I use with my Windows account.
Btw I am using mintty to run WSL:
%LOCALAPPDATA%wslttybinmintty.exe --WSL= -h err --configdir="%APPDATA%wsltty" -~
windows-subsystem-for-linux
Many websites says I should use lxrun /setdefaultuser
, but this command is deprecated:
C:WINDOWSsystem32>lxrun /setdefaultuser foo
Warning: lyrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution.
How can I change the default username which is in my case root
. I would like it to be the same username as I use with my Windows account.
Btw I am using mintty to run WSL:
%LOCALAPPDATA%wslttybinmintty.exe --WSL= -h err --configdir="%APPDATA%wsltty" -~
windows-subsystem-for-linux
windows-subsystem-for-linux
asked Nov 9 '17 at 10:52
nowoxnowox
83711632
83711632
Could be but there is no/setdefaultuser
option :(
– nowox
Nov 9 '17 at 12:32
@Ramhound: Why did you post a bounty when your own answer is accepted?
– harrymc
Jan 22 '18 at 15:24
@Ramhound: I have the exact same question :)
– nowox
Jan 22 '18 at 15:27
Does the accepted answer solve your issue?
– nowox
Jan 22 '18 at 15:45
@Ramhound: What do you expect to achieve? Do you intend to never award the bounty, so nobody gets more than half the bounty and that also only if at least two voters happen to like the answer in the next 5-6 days? You know well that most voters will only look at the accepted answer and go away uninterested.
– harrymc
Jan 22 '18 at 16:28
|
show 1 more comment
Could be but there is no/setdefaultuser
option :(
– nowox
Nov 9 '17 at 12:32
@Ramhound: Why did you post a bounty when your own answer is accepted?
– harrymc
Jan 22 '18 at 15:24
@Ramhound: I have the exact same question :)
– nowox
Jan 22 '18 at 15:27
Does the accepted answer solve your issue?
– nowox
Jan 22 '18 at 15:45
@Ramhound: What do you expect to achieve? Do you intend to never award the bounty, so nobody gets more than half the bounty and that also only if at least two voters happen to like the answer in the next 5-6 days? You know well that most voters will only look at the accepted answer and go away uninterested.
– harrymc
Jan 22 '18 at 16:28
Could be but there is no
/setdefaultuser
option :(– nowox
Nov 9 '17 at 12:32
Could be but there is no
/setdefaultuser
option :(– nowox
Nov 9 '17 at 12:32
@Ramhound: Why did you post a bounty when your own answer is accepted?
– harrymc
Jan 22 '18 at 15:24
@Ramhound: Why did you post a bounty when your own answer is accepted?
– harrymc
Jan 22 '18 at 15:24
@Ramhound: I have the exact same question :)
– nowox
Jan 22 '18 at 15:27
@Ramhound: I have the exact same question :)
– nowox
Jan 22 '18 at 15:27
Does the accepted answer solve your issue?
– nowox
Jan 22 '18 at 15:45
Does the accepted answer solve your issue?
– nowox
Jan 22 '18 at 15:45
@Ramhound: What do you expect to achieve? Do you intend to never award the bounty, so nobody gets more than half the bounty and that also only if at least two voters happen to like the answer in the next 5-6 days? You know well that most voters will only look at the accepted answer and go away uninterested.
– harrymc
Jan 22 '18 at 16:28
@Ramhound: What do you expect to achieve? Do you intend to never award the bounty, so nobody gets more than half the bounty and that also only if at least two voters happen to like the answer in the next 5-6 days? You know well that most voters will only look at the accepted answer and go away uninterested.
– harrymc
Jan 22 '18 at 16:28
|
show 1 more comment
1 Answer
1
active
oldest
votes
Microsoft has documented how this is done on Fall Creators Update and later. The commands suggested are only an example and might vary based on the WSL instance you are using.
This question was asked in 2017, so the name of the WSL instance, might no longer be applicable to a newer version of Ubuntu WSL or if a different WSL distribution is being used. The commands that are suggested will work with any WSL distrubition on the Windows Store.
To see what commands are available for a particular distribution, run
[distro.exe] /?.
For example, with Ubuntu installed:
C:> ubuntu.exe /?
Which means in order to change the default user to root in Ubuntu you would use the following command.
C:> ubuntu config --default-user root
The documentation indicates the following:
Source: User Accounts and Permissions
I wouldn't have been able to find the documentation page if it wasn't for this answer so be sure to give it an upvote.
– Ramhound
Nov 9 '17 at 16:10
How to set default user to root in WSL also submitted a similar answer but I didn't find it until after I submitted my answer.
– Ramhound
Nov 9 '17 at 16:13
My answer was correct when it was submitted in 2017. According to the article it still is valid.
– Ramhound
yesterday
This question and answer is from 2017. Newer versions of WSL instances would come with it own executable. In this case it’s specific to the instance from 2017 not 2018. The commands suggested are examples and specifically geared towards the author’s question. This answer is absolutely correct in the context of the author’s question
– Ramhound
yesterday
Thanks for updating the question to reflect this, it will save people time explicitly stating that in the question as you have (especially noobs like me!). Thanks again!
– rmcsharry
yesterday
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
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%2fsuperuser.com%2fquestions%2f1266881%2fhow-to-change-the-default-user-name-in-wsl%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Microsoft has documented how this is done on Fall Creators Update and later. The commands suggested are only an example and might vary based on the WSL instance you are using.
This question was asked in 2017, so the name of the WSL instance, might no longer be applicable to a newer version of Ubuntu WSL or if a different WSL distribution is being used. The commands that are suggested will work with any WSL distrubition on the Windows Store.
To see what commands are available for a particular distribution, run
[distro.exe] /?.
For example, with Ubuntu installed:
C:> ubuntu.exe /?
Which means in order to change the default user to root in Ubuntu you would use the following command.
C:> ubuntu config --default-user root
The documentation indicates the following:
Source: User Accounts and Permissions
I wouldn't have been able to find the documentation page if it wasn't for this answer so be sure to give it an upvote.
– Ramhound
Nov 9 '17 at 16:10
How to set default user to root in WSL also submitted a similar answer but I didn't find it until after I submitted my answer.
– Ramhound
Nov 9 '17 at 16:13
My answer was correct when it was submitted in 2017. According to the article it still is valid.
– Ramhound
yesterday
This question and answer is from 2017. Newer versions of WSL instances would come with it own executable. In this case it’s specific to the instance from 2017 not 2018. The commands suggested are examples and specifically geared towards the author’s question. This answer is absolutely correct in the context of the author’s question
– Ramhound
yesterday
Thanks for updating the question to reflect this, it will save people time explicitly stating that in the question as you have (especially noobs like me!). Thanks again!
– rmcsharry
yesterday
add a comment |
Microsoft has documented how this is done on Fall Creators Update and later. The commands suggested are only an example and might vary based on the WSL instance you are using.
This question was asked in 2017, so the name of the WSL instance, might no longer be applicable to a newer version of Ubuntu WSL or if a different WSL distribution is being used. The commands that are suggested will work with any WSL distrubition on the Windows Store.
To see what commands are available for a particular distribution, run
[distro.exe] /?.
For example, with Ubuntu installed:
C:> ubuntu.exe /?
Which means in order to change the default user to root in Ubuntu you would use the following command.
C:> ubuntu config --default-user root
The documentation indicates the following:
Source: User Accounts and Permissions
I wouldn't have been able to find the documentation page if it wasn't for this answer so be sure to give it an upvote.
– Ramhound
Nov 9 '17 at 16:10
How to set default user to root in WSL also submitted a similar answer but I didn't find it until after I submitted my answer.
– Ramhound
Nov 9 '17 at 16:13
My answer was correct when it was submitted in 2017. According to the article it still is valid.
– Ramhound
yesterday
This question and answer is from 2017. Newer versions of WSL instances would come with it own executable. In this case it’s specific to the instance from 2017 not 2018. The commands suggested are examples and specifically geared towards the author’s question. This answer is absolutely correct in the context of the author’s question
– Ramhound
yesterday
Thanks for updating the question to reflect this, it will save people time explicitly stating that in the question as you have (especially noobs like me!). Thanks again!
– rmcsharry
yesterday
add a comment |
Microsoft has documented how this is done on Fall Creators Update and later. The commands suggested are only an example and might vary based on the WSL instance you are using.
This question was asked in 2017, so the name of the WSL instance, might no longer be applicable to a newer version of Ubuntu WSL or if a different WSL distribution is being used. The commands that are suggested will work with any WSL distrubition on the Windows Store.
To see what commands are available for a particular distribution, run
[distro.exe] /?.
For example, with Ubuntu installed:
C:> ubuntu.exe /?
Which means in order to change the default user to root in Ubuntu you would use the following command.
C:> ubuntu config --default-user root
The documentation indicates the following:
Source: User Accounts and Permissions
Microsoft has documented how this is done on Fall Creators Update and later. The commands suggested are only an example and might vary based on the WSL instance you are using.
This question was asked in 2017, so the name of the WSL instance, might no longer be applicable to a newer version of Ubuntu WSL or if a different WSL distribution is being used. The commands that are suggested will work with any WSL distrubition on the Windows Store.
To see what commands are available for a particular distribution, run
[distro.exe] /?.
For example, with Ubuntu installed:
C:> ubuntu.exe /?
Which means in order to change the default user to root in Ubuntu you would use the following command.
C:> ubuntu config --default-user root
The documentation indicates the following:
Source: User Accounts and Permissions
edited yesterday
answered Nov 9 '17 at 16:09
RamhoundRamhound
21.6k156288
21.6k156288
I wouldn't have been able to find the documentation page if it wasn't for this answer so be sure to give it an upvote.
– Ramhound
Nov 9 '17 at 16:10
How to set default user to root in WSL also submitted a similar answer but I didn't find it until after I submitted my answer.
– Ramhound
Nov 9 '17 at 16:13
My answer was correct when it was submitted in 2017. According to the article it still is valid.
– Ramhound
yesterday
This question and answer is from 2017. Newer versions of WSL instances would come with it own executable. In this case it’s specific to the instance from 2017 not 2018. The commands suggested are examples and specifically geared towards the author’s question. This answer is absolutely correct in the context of the author’s question
– Ramhound
yesterday
Thanks for updating the question to reflect this, it will save people time explicitly stating that in the question as you have (especially noobs like me!). Thanks again!
– rmcsharry
yesterday
add a comment |
I wouldn't have been able to find the documentation page if it wasn't for this answer so be sure to give it an upvote.
– Ramhound
Nov 9 '17 at 16:10
How to set default user to root in WSL also submitted a similar answer but I didn't find it until after I submitted my answer.
– Ramhound
Nov 9 '17 at 16:13
My answer was correct when it was submitted in 2017. According to the article it still is valid.
– Ramhound
yesterday
This question and answer is from 2017. Newer versions of WSL instances would come with it own executable. In this case it’s specific to the instance from 2017 not 2018. The commands suggested are examples and specifically geared towards the author’s question. This answer is absolutely correct in the context of the author’s question
– Ramhound
yesterday
Thanks for updating the question to reflect this, it will save people time explicitly stating that in the question as you have (especially noobs like me!). Thanks again!
– rmcsharry
yesterday
I wouldn't have been able to find the documentation page if it wasn't for this answer so be sure to give it an upvote.
– Ramhound
Nov 9 '17 at 16:10
I wouldn't have been able to find the documentation page if it wasn't for this answer so be sure to give it an upvote.
– Ramhound
Nov 9 '17 at 16:10
How to set default user to root in WSL also submitted a similar answer but I didn't find it until after I submitted my answer.
– Ramhound
Nov 9 '17 at 16:13
How to set default user to root in WSL also submitted a similar answer but I didn't find it until after I submitted my answer.
– Ramhound
Nov 9 '17 at 16:13
My answer was correct when it was submitted in 2017. According to the article it still is valid.
– Ramhound
yesterday
My answer was correct when it was submitted in 2017. According to the article it still is valid.
– Ramhound
yesterday
This question and answer is from 2017. Newer versions of WSL instances would come with it own executable. In this case it’s specific to the instance from 2017 not 2018. The commands suggested are examples and specifically geared towards the author’s question. This answer is absolutely correct in the context of the author’s question
– Ramhound
yesterday
This question and answer is from 2017. Newer versions of WSL instances would come with it own executable. In this case it’s specific to the instance from 2017 not 2018. The commands suggested are examples and specifically geared towards the author’s question. This answer is absolutely correct in the context of the author’s question
– Ramhound
yesterday
Thanks for updating the question to reflect this, it will save people time explicitly stating that in the question as you have (especially noobs like me!). Thanks again!
– rmcsharry
yesterday
Thanks for updating the question to reflect this, it will save people time explicitly stating that in the question as you have (especially noobs like me!). Thanks again!
– rmcsharry
yesterday
add a comment |
Thanks for contributing an answer to Super User!
- 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%2fsuperuser.com%2fquestions%2f1266881%2fhow-to-change-the-default-user-name-in-wsl%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
Could be but there is no
/setdefaultuser
option :(– nowox
Nov 9 '17 at 12:32
@Ramhound: Why did you post a bounty when your own answer is accepted?
– harrymc
Jan 22 '18 at 15:24
@Ramhound: I have the exact same question :)
– nowox
Jan 22 '18 at 15:27
Does the accepted answer solve your issue?
– nowox
Jan 22 '18 at 15:45
@Ramhound: What do you expect to achieve? Do you intend to never award the bounty, so nobody gets more than half the bounty and that also only if at least two voters happen to like the answer in the next 5-6 days? You know well that most voters will only look at the accepted answer and go away uninterested.
– harrymc
Jan 22 '18 at 16:28