How can I find out my user name?

Solution 1:

Open a Terminal and type whoami

This will work on every Unix/Linux System.

Solution 2:

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.

Solution 3:

Open a Terminal and type:

echo $USER

This will print the value of USER environment variable to the console.

Solution 4:

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

enter image description here

Solution 5:

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.