The fastest way to see your Ubuntu username
Open a terminal and type whoami, then press Enter. The single line that appears is your username. That is the name you use to log in, and it is the name Ubuntu uses to manage your files and permissions.
If you are already logged in and looking at the desktop, you can also click the system menu in the top right corner — the one that shows the time and battery — and your username appears there next to a user icon.
Both methods show the same thing: the account name that owns your current session. If you have multiple user accounts on the machine, each one has its own username, and whoami only tells you which one you are using right now.
Key Takeaways
- Type whoami in the terminal to see your current username when ready.
- Your username is the account name you use to log in, and it controls which files and folders you can access.
- The system menu in the top right corner of the desktop also displays your username without opening a terminal.
- If your computer has multiple user accounts, each person has a different username, and whoami shows only the one you are logged in as right now.
Why you might need to know your username
Your username matters when you are setting up file sharing, configuring permissions, or troubleshooting why you cannot access a folder. It also appears in file paths — for example, your home directory is usually /home/yourusername. Knowing it prevents confusion when you are following instructions that refer to "your home folder" or ask you to "run this as your user."
If you are new to Linux or Ubuntu, your username might not be obvious because it does not always match your full name. The person who set up your account may have chosen something short like alex or jsmith instead of your real name. The whoami command removes any guessing.
Other ways to find your username in the terminal
If whoami does not work for some reason, you can type id and press Enter. This shows your username along with your user ID number and the groups you belong to. The output looks like this: uid=1000(yourname) gid=1000(yourname) groups=1000(yourname),4(adm),24(cdrom). Your username is the word in parentheses after uid=.
You can also look at the file /etc/passwd by typing cat /etc/passwd, which lists every user account on the machine. Your line will show your username at the start, followed by colons and other information. This method is less direct but shows you all accounts on the system at once, which is useful if you are trying to remember whether a particular username exists.
Finding usernames for other accounts on your computer
If you want to see all the usernames on your Ubuntu machine, open a terminal and type cat /etc/passwd. Each line represents one account. The username is always the first part before the first colon. System accounts like root, daemon, and nobody will appear here too — these are not people but accounts that Ubuntu uses internally to run services.
To see only human user accounts (not system accounts), type getent passwd | grep /home. This filters the list to show only accounts that have a home directory, which is a reliable way to spot real user accounts rather than background system accounts.
What to do if you forgot your password but remember your username
Knowing your username is the first step if you need to reset your password. If you can still access the login screen, you can type your username there, then click "Forgot password?" or a similar option, depending on your Ubuntu version. Ubuntu will walk you through resetting it, usually by sending a link to your email or asking security questions.
If you cannot log in at all, you will need to restart your computer in recovery mode or use another account with administrator rights to reset the password. Your username is required for either path, so writing it down somewhere safe is worth doing when you first set up your account.
Username versus display name
Ubuntu lets you set a display name that is different from your username. Your display name is what appears in the system menu and in some applications, while your username is what the system uses behind the scenes. For example, your username might be jsmith, but your display name could be "Jane Smith." The whoami command always shows your username, not your display name.
If you want to change your display name, you can do so in Settings under "Users" — but this does not change your username or your home directory path. Your username stays the same, and all your files remain in the same place.
Frequently Asked Questions
What is the difference between my username and my password?
Your username is your account name — it is public and identifies which account you are using. Your password is secret and proves you own that account. You need both to log in: the username tells Ubuntu which account to check, and the password proves you are the person who should be using it.
Can I change my username after I create my account?
Changing your username is possible but complicated because it affects your home directory path and file ownership. Most people find it easier to create a new account with the desired username and copy files over. If you need to do this, the Ubuntu community documentation covers the steps, but it is a task for someone comfortable with the terminal.
Why does the terminal show a different username than what I see in Settings?
You are probably seeing your display name in Settings and your actual username in the terminal. They can be different. The terminal always shows your real username because that is what the system uses for permissions and file ownership. Check Settings under "Users" to see both your username and your display name side by side.
Does my username have to match my email address?
No. Your username is separate from your email address. You can have a username like alex and an email like alexander.jones@example.com. Ubuntu does not require them to match. Some applications may ask for your email, but that is different from your system username.