How can I find out my user name?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
How do I know my username? I've installed Ubuntu, but I don't know my username, only my password. I can't access my laptop and it can't be opened.
system-installation users username
add a comment |
How do I know my username? I've installed Ubuntu, but I don't know my username, only my password. I can't access my laptop and it can't be opened.
system-installation users username
6
The login screen shows possible accounts and you only have to click (or even not have to click since you were presumably the last to log in) and type your password.
– Gilles
Aug 17 '13 at 11:22
1
@Jayharte - did any of these answers work for you? If so, please accept one as the answer. Thank you.
– Tass
Dec 3 '13 at 14:37
add a comment |
How do I know my username? I've installed Ubuntu, but I don't know my username, only my password. I can't access my laptop and it can't be opened.
system-installation users username
How do I know my username? I've installed Ubuntu, but I don't know my username, only my password. I can't access my laptop and it can't be opened.
system-installation users username
system-installation users username
edited May 31 '15 at 20:26
Tim
20.2k1586142
20.2k1586142
asked Aug 17 '13 at 11:09
JayharteJayharte
349133
349133
6
The login screen shows possible accounts and you only have to click (or even not have to click since you were presumably the last to log in) and type your password.
– Gilles
Aug 17 '13 at 11:22
1
@Jayharte - did any of these answers work for you? If so, please accept one as the answer. Thank you.
– Tass
Dec 3 '13 at 14:37
add a comment |
6
The login screen shows possible accounts and you only have to click (or even not have to click since you were presumably the last to log in) and type your password.
– Gilles
Aug 17 '13 at 11:22
1
@Jayharte - did any of these answers work for you? If so, please accept one as the answer. Thank you.
– Tass
Dec 3 '13 at 14:37
6
6
The login screen shows possible accounts and you only have to click (or even not have to click since you were presumably the last to log in) and type your password.
– Gilles
Aug 17 '13 at 11:22
The login screen shows possible accounts and you only have to click (or even not have to click since you were presumably the last to log in) and type your password.
– Gilles
Aug 17 '13 at 11:22
1
1
@Jayharte - did any of these answers work for you? If so, please accept one as the answer. Thank you.
– Tass
Dec 3 '13 at 14:37
@Jayharte - did any of these answers work for you? If so, please accept one as the answer. Thank you.
– Tass
Dec 3 '13 at 14:37
add a comment |
8 Answers
8
active
oldest
votes
Open a Terminal and type whoami
This will work on every Unix/Linux System.
7
He cannot login so I bet that he cannot run whoami
– Boris
Aug 18 '13 at 8:50
1
He could run it from recovery mode
– rajlego
Mar 4 '14 at 2:59
4
@rajlego If run from recovery mode,whoami
would just outputroot
. However, in recovery mode,ls /home
could be used to view the names of the system's normally configured human users. If there's just one such user, this output is their username; and even if there are more, it should make it pretty easy to figure out the username.
– Eliah Kagan
Sep 6 '14 at 4:45
Agree with @Boris. As he mentioned in the answer, he could not login, how could he launchwhoami
? It's strange to have this answer got many vote-ups.
– Tung Tran
Dec 15 '15 at 14:16
2
@TungTran - Upvotes are from googlers (like me) who came here looking for the answer to the question in the title. Some of us just need a reminder of the command that prints out the current username. But, reading the actual question, this answer is pretty useless to the asker.
– gilly3
Sep 22 '16 at 21:24
add a comment |
Most simple way to find out your username is probably to press ctr+alt+t - this opens terminal and than you will see something like:
user_name@machine_name:~$
And that answers your question.
So is user_name is the user name and machine_name is the group?
– Rafael_Espericueta
Jul 25 '16 at 20:58
No. Machine name is name of your computer.
– Jendas
Jul 25 '16 at 21:01
this is not always correct, as what the terminal shows is configurable
– Elzo Valugi
Oct 23 '18 at 15:28
1
If you can configure your terminal, you probably know thewhoami
command.
– Jendas
Nov 9 '18 at 14:30
add a comment |
If you installed ubuntu, then you filled in your username, does this help jog our memory?
E.g. here where yann
is the user name
add a comment |
Open a Terminal and type:
echo $USER
This will print the value of USER
environment variable to the console.
3
To the original asker, this is as useless as thewhoami
command, but in all honesty, this is perfect for those "run ablah username_here
" commands whereusername_here
part can be replaced with$USER
and the whole command made more universal. Thanks.
– nurchi
Sep 26 '16 at 18:42
1
@Ali Dehghani, $USER is an environment variable that can be changed to anything. whoami actually checks which is the currently logged in user
– Josef Klimuk
Apr 24 '18 at 6:55
add a comment |
You should boot up your Ubuntu in recovery mode. Follow the steps below:
Switch on your computer. Wait until the BIOS has finished loading, or has almost finished. (During this time you will probably see a logo of your computer manufacturer.)
Quickly press and hold the Shift key, which will bring up the GNU GRUB menu. (If you see the Ubuntu logo, you've missed the point where you can enter the GRUB menu.) **Select the line which starts with "Advanced options". *
Select the line ending with "(recovery mode)", probably the second
line, something like:Ubuntu GNU/Linux, with Linux 3.8.0-26-generic (recovery mode)
Press Return and your machine will begin the boot process.
After a few moments, your workstation should display a menu with a
number of options. One of the options (you may need to scroll down
to the bottom of the list) will be "Drop to root shell prompt".
Press Return with this option highlighted.
Eventually, you could use this command to list all usernames:
cut -d: -f1 /etc/passwd
I suppose you will be able to recognize your username in the list.
You don't need toremount,rw
for just reading a file...
– Germar
Dec 2 '15 at 4:59
You're right, I just given it as an option.
– Tung Tran
Dec 2 '15 at 5:01
This will work if the user hasn't set their root password ever. However, if someone has set it already, they can always just use a live usb or any other OS to look at the home directory(hopefully unencrypted.)
– Rohitt Vashishtha
Dec 2 '15 at 5:22
Yes, if he remembers his root password, it's even easier. Anyway, as he said, he's installed the Ubuntu and doesn't know his username. I suppose he didn't set root password.
– Tung Tran
Dec 2 '15 at 7:03
Also, with single user mode, even though you set a root password, you will be able to skip it.
– Tung Tran
Dec 2 '15 at 7:04
add a comment |
Normally when you start your computer, you don't have to know your username to log on, because it appears automatically in a list. And if it's the only user account, it's the only name listed. It should look like this:
If there is more than one user account, click on the name you want to use. For just one user, all you have to do is type in your password.
If your login screen does not look like that, or logging in does not work, or the problem is that booting fails before you get to the login screen, please let us know, and provide as many details as possible.
3
Impressive edit Eliath !!
– Boris
Aug 18 '13 at 9:14
I suppose he has a problem displaying the username on the login page. If he could see the login screen, he would recognize the username. Then if so, we wouldn't ask.
– Tung Tran
Dec 15 '15 at 14:18
My username and my name are different so this won't always work.
– mchid
Dec 21 '15 at 3:18
add a comment |
From recovery mode, run the following command to list all human like users:
awk -F'[/:]' '{if ($3 >= 1000 && $3 != 65534) print $1}' /etc/passwd
source
add a comment |
Use this solution if you didn't encrypt your home directory.
Do you still have the installation media(LiveCD/USB) from which you installed Ubuntu? Boot from it and select Try Ubuntu.
Go to Files and then, you will see you already installed Ubuntu partition. Click on it, it will mount.
Go to
/home
. Here you will see a list of all users on the system that you have created.
To jog your memory, however, what is your name? Did you enter the same name while installing Ubuntu? Do you recall the name that was displayed on the login prompt where you entered your password? Ubuntu by default sets the username as your first name in lowercase.
Example; name= John Doe, automatically set username= john
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%2f333718%2fhow-can-i-find-out-my-user-name%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
8 Answers
8
active
oldest
votes
8 Answers
8
active
oldest
votes
active
oldest
votes
active
oldest
votes
Open a Terminal and type whoami
This will work on every Unix/Linux System.
7
He cannot login so I bet that he cannot run whoami
– Boris
Aug 18 '13 at 8:50
1
He could run it from recovery mode
– rajlego
Mar 4 '14 at 2:59
4
@rajlego If run from recovery mode,whoami
would just outputroot
. However, in recovery mode,ls /home
could be used to view the names of the system's normally configured human users. If there's just one such user, this output is their username; and even if there are more, it should make it pretty easy to figure out the username.
– Eliah Kagan
Sep 6 '14 at 4:45
Agree with @Boris. As he mentioned in the answer, he could not login, how could he launchwhoami
? It's strange to have this answer got many vote-ups.
– Tung Tran
Dec 15 '15 at 14:16
2
@TungTran - Upvotes are from googlers (like me) who came here looking for the answer to the question in the title. Some of us just need a reminder of the command that prints out the current username. But, reading the actual question, this answer is pretty useless to the asker.
– gilly3
Sep 22 '16 at 21:24
add a comment |
Open a Terminal and type whoami
This will work on every Unix/Linux System.
7
He cannot login so I bet that he cannot run whoami
– Boris
Aug 18 '13 at 8:50
1
He could run it from recovery mode
– rajlego
Mar 4 '14 at 2:59
4
@rajlego If run from recovery mode,whoami
would just outputroot
. However, in recovery mode,ls /home
could be used to view the names of the system's normally configured human users. If there's just one such user, this output is their username; and even if there are more, it should make it pretty easy to figure out the username.
– Eliah Kagan
Sep 6 '14 at 4:45
Agree with @Boris. As he mentioned in the answer, he could not login, how could he launchwhoami
? It's strange to have this answer got many vote-ups.
– Tung Tran
Dec 15 '15 at 14:16
2
@TungTran - Upvotes are from googlers (like me) who came here looking for the answer to the question in the title. Some of us just need a reminder of the command that prints out the current username. But, reading the actual question, this answer is pretty useless to the asker.
– gilly3
Sep 22 '16 at 21:24
add a comment |
Open a Terminal and type whoami
This will work on every Unix/Linux System.
Open a Terminal and type whoami
This will work on every Unix/Linux System.
answered Aug 17 '13 at 16:01
GermarGermar
4,17921532
4,17921532
7
He cannot login so I bet that he cannot run whoami
– Boris
Aug 18 '13 at 8:50
1
He could run it from recovery mode
– rajlego
Mar 4 '14 at 2:59
4
@rajlego If run from recovery mode,whoami
would just outputroot
. However, in recovery mode,ls /home
could be used to view the names of the system's normally configured human users. If there's just one such user, this output is their username; and even if there are more, it should make it pretty easy to figure out the username.
– Eliah Kagan
Sep 6 '14 at 4:45
Agree with @Boris. As he mentioned in the answer, he could not login, how could he launchwhoami
? It's strange to have this answer got many vote-ups.
– Tung Tran
Dec 15 '15 at 14:16
2
@TungTran - Upvotes are from googlers (like me) who came here looking for the answer to the question in the title. Some of us just need a reminder of the command that prints out the current username. But, reading the actual question, this answer is pretty useless to the asker.
– gilly3
Sep 22 '16 at 21:24
add a comment |
7
He cannot login so I bet that he cannot run whoami
– Boris
Aug 18 '13 at 8:50
1
He could run it from recovery mode
– rajlego
Mar 4 '14 at 2:59
4
@rajlego If run from recovery mode,whoami
would just outputroot
. However, in recovery mode,ls /home
could be used to view the names of the system's normally configured human users. If there's just one such user, this output is their username; and even if there are more, it should make it pretty easy to figure out the username.
– Eliah Kagan
Sep 6 '14 at 4:45
Agree with @Boris. As he mentioned in the answer, he could not login, how could he launchwhoami
? It's strange to have this answer got many vote-ups.
– Tung Tran
Dec 15 '15 at 14:16
2
@TungTran - Upvotes are from googlers (like me) who came here looking for the answer to the question in the title. Some of us just need a reminder of the command that prints out the current username. But, reading the actual question, this answer is pretty useless to the asker.
– gilly3
Sep 22 '16 at 21:24
7
7
He cannot login so I bet that he cannot run whoami
– Boris
Aug 18 '13 at 8:50
He cannot login so I bet that he cannot run whoami
– Boris
Aug 18 '13 at 8:50
1
1
He could run it from recovery mode
– rajlego
Mar 4 '14 at 2:59
He could run it from recovery mode
– rajlego
Mar 4 '14 at 2:59
4
4
@rajlego If run from recovery mode,
whoami
would just output root
. However, in recovery mode, ls /home
could be used to view the names of the system's normally configured human users. If there's just one such user, this output is their username; and even if there are more, it should make it pretty easy to figure out the username.– Eliah Kagan
Sep 6 '14 at 4:45
@rajlego If run from recovery mode,
whoami
would just output root
. However, in recovery mode, ls /home
could be used to view the names of the system's normally configured human users. If there's just one such user, this output is their username; and even if there are more, it should make it pretty easy to figure out the username.– Eliah Kagan
Sep 6 '14 at 4:45
Agree with @Boris. As he mentioned in the answer, he could not login, how could he launch
whoami
? It's strange to have this answer got many vote-ups.– Tung Tran
Dec 15 '15 at 14:16
Agree with @Boris. As he mentioned in the answer, he could not login, how could he launch
whoami
? It's strange to have this answer got many vote-ups.– Tung Tran
Dec 15 '15 at 14:16
2
2
@TungTran - Upvotes are from googlers (like me) who came here looking for the answer to the question in the title. Some of us just need a reminder of the command that prints out the current username. But, reading the actual question, this answer is pretty useless to the asker.
– gilly3
Sep 22 '16 at 21:24
@TungTran - Upvotes are from googlers (like me) who came here looking for the answer to the question in the title. Some of us just need a reminder of the command that prints out the current username. But, reading the actual question, this answer is pretty useless to the asker.
– gilly3
Sep 22 '16 at 21:24
add a comment |
Most simple way to find out your username is probably to press ctr+alt+t - this opens terminal and than you will see something like:
user_name@machine_name:~$
And that answers your question.
So is user_name is the user name and machine_name is the group?
– Rafael_Espericueta
Jul 25 '16 at 20:58
No. Machine name is name of your computer.
– Jendas
Jul 25 '16 at 21:01
this is not always correct, as what the terminal shows is configurable
– Elzo Valugi
Oct 23 '18 at 15:28
1
If you can configure your terminal, you probably know thewhoami
command.
– Jendas
Nov 9 '18 at 14:30
add a comment |
Most simple way to find out your username is probably to press ctr+alt+t - this opens terminal and than you will see something like:
user_name@machine_name:~$
And that answers your question.
So is user_name is the user name and machine_name is the group?
– Rafael_Espericueta
Jul 25 '16 at 20:58
No. Machine name is name of your computer.
– Jendas
Jul 25 '16 at 21:01
this is not always correct, as what the terminal shows is configurable
– Elzo Valugi
Oct 23 '18 at 15:28
1
If you can configure your terminal, you probably know thewhoami
command.
– Jendas
Nov 9 '18 at 14:30
add a comment |
Most simple way to find out your username is probably to press ctr+alt+t - this opens terminal and than you will see something like:
user_name@machine_name:~$
And that answers your question.
Most simple way to find out your username is probably to press ctr+alt+t - this opens terminal and than you will see something like:
user_name@machine_name:~$
And that answers your question.
edited Dec 2 '15 at 14:19
answered Aug 17 '13 at 15:24
JendasJendas
6081518
6081518
So is user_name is the user name and machine_name is the group?
– Rafael_Espericueta
Jul 25 '16 at 20:58
No. Machine name is name of your computer.
– Jendas
Jul 25 '16 at 21:01
this is not always correct, as what the terminal shows is configurable
– Elzo Valugi
Oct 23 '18 at 15:28
1
If you can configure your terminal, you probably know thewhoami
command.
– Jendas
Nov 9 '18 at 14:30
add a comment |
So is user_name is the user name and machine_name is the group?
– Rafael_Espericueta
Jul 25 '16 at 20:58
No. Machine name is name of your computer.
– Jendas
Jul 25 '16 at 21:01
this is not always correct, as what the terminal shows is configurable
– Elzo Valugi
Oct 23 '18 at 15:28
1
If you can configure your terminal, you probably know thewhoami
command.
– Jendas
Nov 9 '18 at 14:30
So is user_name is the user name and machine_name is the group?
– Rafael_Espericueta
Jul 25 '16 at 20:58
So is user_name is the user name and machine_name is the group?
– Rafael_Espericueta
Jul 25 '16 at 20:58
No. Machine name is name of your computer.
– Jendas
Jul 25 '16 at 21:01
No. Machine name is name of your computer.
– Jendas
Jul 25 '16 at 21:01
this is not always correct, as what the terminal shows is configurable
– Elzo Valugi
Oct 23 '18 at 15:28
this is not always correct, as what the terminal shows is configurable
– Elzo Valugi
Oct 23 '18 at 15:28
1
1
If you can configure your terminal, you probably know the
whoami
command.– Jendas
Nov 9 '18 at 14:30
If you can configure your terminal, you probably know the
whoami
command.– Jendas
Nov 9 '18 at 14:30
add a comment |
If you installed ubuntu, then you filled in your username, does this help jog our memory?
E.g. here where yann
is the user name
add a comment |
If you installed ubuntu, then you filled in your username, does this help jog our memory?
E.g. here where yann
is the user name
add a comment |
If you installed ubuntu, then you filled in your username, does this help jog our memory?
E.g. here where yann
is the user name
If you installed ubuntu, then you filled in your username, does this help jog our memory?
E.g. here where yann
is the user name
edited Aug 17 '13 at 14:43
enzotib
65.1k8136155
65.1k8136155
answered Aug 17 '13 at 12:02
damiendamien
1,72121640
1,72121640
add a comment |
add a comment |
Open a Terminal and type:
echo $USER
This will print the value of USER
environment variable to the console.
3
To the original asker, this is as useless as thewhoami
command, but in all honesty, this is perfect for those "run ablah username_here
" commands whereusername_here
part can be replaced with$USER
and the whole command made more universal. Thanks.
– nurchi
Sep 26 '16 at 18:42
1
@Ali Dehghani, $USER is an environment variable that can be changed to anything. whoami actually checks which is the currently logged in user
– Josef Klimuk
Apr 24 '18 at 6:55
add a comment |
Open a Terminal and type:
echo $USER
This will print the value of USER
environment variable to the console.
3
To the original asker, this is as useless as thewhoami
command, but in all honesty, this is perfect for those "run ablah username_here
" commands whereusername_here
part can be replaced with$USER
and the whole command made more universal. Thanks.
– nurchi
Sep 26 '16 at 18:42
1
@Ali Dehghani, $USER is an environment variable that can be changed to anything. whoami actually checks which is the currently logged in user
– Josef Klimuk
Apr 24 '18 at 6:55
add a comment |
Open a Terminal and type:
echo $USER
This will print the value of USER
environment variable to the console.
Open a Terminal and type:
echo $USER
This will print the value of USER
environment variable to the console.
answered Apr 6 '16 at 18:42
Ali DehghaniAli Dehghani
35649
35649
3
To the original asker, this is as useless as thewhoami
command, but in all honesty, this is perfect for those "run ablah username_here
" commands whereusername_here
part can be replaced with$USER
and the whole command made more universal. Thanks.
– nurchi
Sep 26 '16 at 18:42
1
@Ali Dehghani, $USER is an environment variable that can be changed to anything. whoami actually checks which is the currently logged in user
– Josef Klimuk
Apr 24 '18 at 6:55
add a comment |
3
To the original asker, this is as useless as thewhoami
command, but in all honesty, this is perfect for those "run ablah username_here
" commands whereusername_here
part can be replaced with$USER
and the whole command made more universal. Thanks.
– nurchi
Sep 26 '16 at 18:42
1
@Ali Dehghani, $USER is an environment variable that can be changed to anything. whoami actually checks which is the currently logged in user
– Josef Klimuk
Apr 24 '18 at 6:55
3
3
To the original asker, this is as useless as the
whoami
command, but in all honesty, this is perfect for those "run a blah username_here
" commands where username_here
part can be replaced with $USER
and the whole command made more universal. Thanks.– nurchi
Sep 26 '16 at 18:42
To the original asker, this is as useless as the
whoami
command, but in all honesty, this is perfect for those "run a blah username_here
" commands where username_here
part can be replaced with $USER
and the whole command made more universal. Thanks.– nurchi
Sep 26 '16 at 18:42
1
1
@Ali Dehghani, $USER is an environment variable that can be changed to anything. whoami actually checks which is the currently logged in user
– Josef Klimuk
Apr 24 '18 at 6:55
@Ali Dehghani, $USER is an environment variable that can be changed to anything. whoami actually checks which is the currently logged in user
– Josef Klimuk
Apr 24 '18 at 6:55
add a comment |
You should boot up your Ubuntu in recovery mode. Follow the steps below:
Switch on your computer. Wait until the BIOS has finished loading, or has almost finished. (During this time you will probably see a logo of your computer manufacturer.)
Quickly press and hold the Shift key, which will bring up the GNU GRUB menu. (If you see the Ubuntu logo, you've missed the point where you can enter the GRUB menu.) **Select the line which starts with "Advanced options". *
Select the line ending with "(recovery mode)", probably the second
line, something like:Ubuntu GNU/Linux, with Linux 3.8.0-26-generic (recovery mode)
Press Return and your machine will begin the boot process.
After a few moments, your workstation should display a menu with a
number of options. One of the options (you may need to scroll down
to the bottom of the list) will be "Drop to root shell prompt".
Press Return with this option highlighted.
Eventually, you could use this command to list all usernames:
cut -d: -f1 /etc/passwd
I suppose you will be able to recognize your username in the list.
You don't need toremount,rw
for just reading a file...
– Germar
Dec 2 '15 at 4:59
You're right, I just given it as an option.
– Tung Tran
Dec 2 '15 at 5:01
This will work if the user hasn't set their root password ever. However, if someone has set it already, they can always just use a live usb or any other OS to look at the home directory(hopefully unencrypted.)
– Rohitt Vashishtha
Dec 2 '15 at 5:22
Yes, if he remembers his root password, it's even easier. Anyway, as he said, he's installed the Ubuntu and doesn't know his username. I suppose he didn't set root password.
– Tung Tran
Dec 2 '15 at 7:03
Also, with single user mode, even though you set a root password, you will be able to skip it.
– Tung Tran
Dec 2 '15 at 7:04
add a comment |
You should boot up your Ubuntu in recovery mode. Follow the steps below:
Switch on your computer. Wait until the BIOS has finished loading, or has almost finished. (During this time you will probably see a logo of your computer manufacturer.)
Quickly press and hold the Shift key, which will bring up the GNU GRUB menu. (If you see the Ubuntu logo, you've missed the point where you can enter the GRUB menu.) **Select the line which starts with "Advanced options". *
Select the line ending with "(recovery mode)", probably the second
line, something like:Ubuntu GNU/Linux, with Linux 3.8.0-26-generic (recovery mode)
Press Return and your machine will begin the boot process.
After a few moments, your workstation should display a menu with a
number of options. One of the options (you may need to scroll down
to the bottom of the list) will be "Drop to root shell prompt".
Press Return with this option highlighted.
Eventually, you could use this command to list all usernames:
cut -d: -f1 /etc/passwd
I suppose you will be able to recognize your username in the list.
You don't need toremount,rw
for just reading a file...
– Germar
Dec 2 '15 at 4:59
You're right, I just given it as an option.
– Tung Tran
Dec 2 '15 at 5:01
This will work if the user hasn't set their root password ever. However, if someone has set it already, they can always just use a live usb or any other OS to look at the home directory(hopefully unencrypted.)
– Rohitt Vashishtha
Dec 2 '15 at 5:22
Yes, if he remembers his root password, it's even easier. Anyway, as he said, he's installed the Ubuntu and doesn't know his username. I suppose he didn't set root password.
– Tung Tran
Dec 2 '15 at 7:03
Also, with single user mode, even though you set a root password, you will be able to skip it.
– Tung Tran
Dec 2 '15 at 7:04
add a comment |
You should boot up your Ubuntu in recovery mode. Follow the steps below:
Switch on your computer. Wait until the BIOS has finished loading, or has almost finished. (During this time you will probably see a logo of your computer manufacturer.)
Quickly press and hold the Shift key, which will bring up the GNU GRUB menu. (If you see the Ubuntu logo, you've missed the point where you can enter the GRUB menu.) **Select the line which starts with "Advanced options". *
Select the line ending with "(recovery mode)", probably the second
line, something like:Ubuntu GNU/Linux, with Linux 3.8.0-26-generic (recovery mode)
Press Return and your machine will begin the boot process.
After a few moments, your workstation should display a menu with a
number of options. One of the options (you may need to scroll down
to the bottom of the list) will be "Drop to root shell prompt".
Press Return with this option highlighted.
Eventually, you could use this command to list all usernames:
cut -d: -f1 /etc/passwd
I suppose you will be able to recognize your username in the list.
You should boot up your Ubuntu in recovery mode. Follow the steps below:
Switch on your computer. Wait until the BIOS has finished loading, or has almost finished. (During this time you will probably see a logo of your computer manufacturer.)
Quickly press and hold the Shift key, which will bring up the GNU GRUB menu. (If you see the Ubuntu logo, you've missed the point where you can enter the GRUB menu.) **Select the line which starts with "Advanced options". *
Select the line ending with "(recovery mode)", probably the second
line, something like:Ubuntu GNU/Linux, with Linux 3.8.0-26-generic (recovery mode)
Press Return and your machine will begin the boot process.
After a few moments, your workstation should display a menu with a
number of options. One of the options (you may need to scroll down
to the bottom of the list) will be "Drop to root shell prompt".
Press Return with this option highlighted.
Eventually, you could use this command to list all usernames:
cut -d: -f1 /etc/passwd
I suppose you will be able to recognize your username in the list.
edited Dec 2 '15 at 5:00
answered Dec 2 '15 at 4:52
Tung TranTung Tran
2,77311025
2,77311025
You don't need toremount,rw
for just reading a file...
– Germar
Dec 2 '15 at 4:59
You're right, I just given it as an option.
– Tung Tran
Dec 2 '15 at 5:01
This will work if the user hasn't set their root password ever. However, if someone has set it already, they can always just use a live usb or any other OS to look at the home directory(hopefully unencrypted.)
– Rohitt Vashishtha
Dec 2 '15 at 5:22
Yes, if he remembers his root password, it's even easier. Anyway, as he said, he's installed the Ubuntu and doesn't know his username. I suppose he didn't set root password.
– Tung Tran
Dec 2 '15 at 7:03
Also, with single user mode, even though you set a root password, you will be able to skip it.
– Tung Tran
Dec 2 '15 at 7:04
add a comment |
You don't need toremount,rw
for just reading a file...
– Germar
Dec 2 '15 at 4:59
You're right, I just given it as an option.
– Tung Tran
Dec 2 '15 at 5:01
This will work if the user hasn't set their root password ever. However, if someone has set it already, they can always just use a live usb or any other OS to look at the home directory(hopefully unencrypted.)
– Rohitt Vashishtha
Dec 2 '15 at 5:22
Yes, if he remembers his root password, it's even easier. Anyway, as he said, he's installed the Ubuntu and doesn't know his username. I suppose he didn't set root password.
– Tung Tran
Dec 2 '15 at 7:03
Also, with single user mode, even though you set a root password, you will be able to skip it.
– Tung Tran
Dec 2 '15 at 7:04
You don't need to
remount,rw
for just reading a file...– Germar
Dec 2 '15 at 4:59
You don't need to
remount,rw
for just reading a file...– Germar
Dec 2 '15 at 4:59
You're right, I just given it as an option.
– Tung Tran
Dec 2 '15 at 5:01
You're right, I just given it as an option.
– Tung Tran
Dec 2 '15 at 5:01
This will work if the user hasn't set their root password ever. However, if someone has set it already, they can always just use a live usb or any other OS to look at the home directory(hopefully unencrypted.)
– Rohitt Vashishtha
Dec 2 '15 at 5:22
This will work if the user hasn't set their root password ever. However, if someone has set it already, they can always just use a live usb or any other OS to look at the home directory(hopefully unencrypted.)
– Rohitt Vashishtha
Dec 2 '15 at 5:22
Yes, if he remembers his root password, it's even easier. Anyway, as he said, he's installed the Ubuntu and doesn't know his username. I suppose he didn't set root password.
– Tung Tran
Dec 2 '15 at 7:03
Yes, if he remembers his root password, it's even easier. Anyway, as he said, he's installed the Ubuntu and doesn't know his username. I suppose he didn't set root password.
– Tung Tran
Dec 2 '15 at 7:03
Also, with single user mode, even though you set a root password, you will be able to skip it.
– Tung Tran
Dec 2 '15 at 7:04
Also, with single user mode, even though you set a root password, you will be able to skip it.
– Tung Tran
Dec 2 '15 at 7:04
add a comment |
Normally when you start your computer, you don't have to know your username to log on, because it appears automatically in a list. And if it's the only user account, it's the only name listed. It should look like this:
If there is more than one user account, click on the name you want to use. For just one user, all you have to do is type in your password.
If your login screen does not look like that, or logging in does not work, or the problem is that booting fails before you get to the login screen, please let us know, and provide as many details as possible.
3
Impressive edit Eliath !!
– Boris
Aug 18 '13 at 9:14
I suppose he has a problem displaying the username on the login page. If he could see the login screen, he would recognize the username. Then if so, we wouldn't ask.
– Tung Tran
Dec 15 '15 at 14:18
My username and my name are different so this won't always work.
– mchid
Dec 21 '15 at 3:18
add a comment |
Normally when you start your computer, you don't have to know your username to log on, because it appears automatically in a list. And if it's the only user account, it's the only name listed. It should look like this:
If there is more than one user account, click on the name you want to use. For just one user, all you have to do is type in your password.
If your login screen does not look like that, or logging in does not work, or the problem is that booting fails before you get to the login screen, please let us know, and provide as many details as possible.
3
Impressive edit Eliath !!
– Boris
Aug 18 '13 at 9:14
I suppose he has a problem displaying the username on the login page. If he could see the login screen, he would recognize the username. Then if so, we wouldn't ask.
– Tung Tran
Dec 15 '15 at 14:18
My username and my name are different so this won't always work.
– mchid
Dec 21 '15 at 3:18
add a comment |
Normally when you start your computer, you don't have to know your username to log on, because it appears automatically in a list. And if it's the only user account, it's the only name listed. It should look like this:
If there is more than one user account, click on the name you want to use. For just one user, all you have to do is type in your password.
If your login screen does not look like that, or logging in does not work, or the problem is that booting fails before you get to the login screen, please let us know, and provide as many details as possible.
Normally when you start your computer, you don't have to know your username to log on, because it appears automatically in a list. And if it's the only user account, it's the only name listed. It should look like this:
If there is more than one user account, click on the name you want to use. For just one user, all you have to do is type in your password.
If your login screen does not look like that, or logging in does not work, or the problem is that booting fails before you get to the login screen, please let us know, and provide as many details as possible.
edited Aug 18 '13 at 9:07
Eliah Kagan
83.2k22229369
83.2k22229369
answered Aug 18 '13 at 8:56
BorisBoris
3,29773356
3,29773356
3
Impressive edit Eliath !!
– Boris
Aug 18 '13 at 9:14
I suppose he has a problem displaying the username on the login page. If he could see the login screen, he would recognize the username. Then if so, we wouldn't ask.
– Tung Tran
Dec 15 '15 at 14:18
My username and my name are different so this won't always work.
– mchid
Dec 21 '15 at 3:18
add a comment |
3
Impressive edit Eliath !!
– Boris
Aug 18 '13 at 9:14
I suppose he has a problem displaying the username on the login page. If he could see the login screen, he would recognize the username. Then if so, we wouldn't ask.
– Tung Tran
Dec 15 '15 at 14:18
My username and my name are different so this won't always work.
– mchid
Dec 21 '15 at 3:18
3
3
Impressive edit Eliath !!
– Boris
Aug 18 '13 at 9:14
Impressive edit Eliath !!
– Boris
Aug 18 '13 at 9:14
I suppose he has a problem displaying the username on the login page. If he could see the login screen, he would recognize the username. Then if so, we wouldn't ask.
– Tung Tran
Dec 15 '15 at 14:18
I suppose he has a problem displaying the username on the login page. If he could see the login screen, he would recognize the username. Then if so, we wouldn't ask.
– Tung Tran
Dec 15 '15 at 14:18
My username and my name are different so this won't always work.
– mchid
Dec 21 '15 at 3:18
My username and my name are different so this won't always work.
– mchid
Dec 21 '15 at 3:18
add a comment |
From recovery mode, run the following command to list all human like users:
awk -F'[/:]' '{if ($3 >= 1000 && $3 != 65534) print $1}' /etc/passwd
source
add a comment |
From recovery mode, run the following command to list all human like users:
awk -F'[/:]' '{if ($3 >= 1000 && $3 != 65534) print $1}' /etc/passwd
source
add a comment |
From recovery mode, run the following command to list all human like users:
awk -F'[/:]' '{if ($3 >= 1000 && $3 != 65534) print $1}' /etc/passwd
source
From recovery mode, run the following command to list all human like users:
awk -F'[/:]' '{if ($3 >= 1000 && $3 != 65534) print $1}' /etc/passwd
source
edited Apr 13 '17 at 12:23
community wiki
2 revs
mchid
add a comment |
add a comment |
Use this solution if you didn't encrypt your home directory.
Do you still have the installation media(LiveCD/USB) from which you installed Ubuntu? Boot from it and select Try Ubuntu.
Go to Files and then, you will see you already installed Ubuntu partition. Click on it, it will mount.
Go to
/home
. Here you will see a list of all users on the system that you have created.
To jog your memory, however, what is your name? Did you enter the same name while installing Ubuntu? Do you recall the name that was displayed on the login prompt where you entered your password? Ubuntu by default sets the username as your first name in lowercase.
Example; name= John Doe, automatically set username= john
add a comment |
Use this solution if you didn't encrypt your home directory.
Do you still have the installation media(LiveCD/USB) from which you installed Ubuntu? Boot from it and select Try Ubuntu.
Go to Files and then, you will see you already installed Ubuntu partition. Click on it, it will mount.
Go to
/home
. Here you will see a list of all users on the system that you have created.
To jog your memory, however, what is your name? Did you enter the same name while installing Ubuntu? Do you recall the name that was displayed on the login prompt where you entered your password? Ubuntu by default sets the username as your first name in lowercase.
Example; name= John Doe, automatically set username= john
add a comment |
Use this solution if you didn't encrypt your home directory.
Do you still have the installation media(LiveCD/USB) from which you installed Ubuntu? Boot from it and select Try Ubuntu.
Go to Files and then, you will see you already installed Ubuntu partition. Click on it, it will mount.
Go to
/home
. Here you will see a list of all users on the system that you have created.
To jog your memory, however, what is your name? Did you enter the same name while installing Ubuntu? Do you recall the name that was displayed on the login prompt where you entered your password? Ubuntu by default sets the username as your first name in lowercase.
Example; name= John Doe, automatically set username= john
Use this solution if you didn't encrypt your home directory.
Do you still have the installation media(LiveCD/USB) from which you installed Ubuntu? Boot from it and select Try Ubuntu.
Go to Files and then, you will see you already installed Ubuntu partition. Click on it, it will mount.
Go to
/home
. Here you will see a list of all users on the system that you have created.
To jog your memory, however, what is your name? Did you enter the same name while installing Ubuntu? Do you recall the name that was displayed on the login prompt where you entered your password? Ubuntu by default sets the username as your first name in lowercase.
Example; name= John Doe, automatically set username= john
edited Dec 2 '15 at 5:46
muru
1
1
answered Dec 2 '15 at 5:29
Rohitt VashishthaRohitt Vashishtha
3141513
3141513
add a comment |
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%2f333718%2fhow-can-i-find-out-my-user-name%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
6
The login screen shows possible accounts and you only have to click (or even not have to click since you were presumably the last to log in) and type your password.
– Gilles
Aug 17 '13 at 11:22
1
@Jayharte - did any of these answers work for you? If so, please accept one as the answer. Thank you.
– Tass
Dec 3 '13 at 14:37