The fastest way to find your username

Your computer username is the name you use to log in. On Windows, the quickest way to find it is to open the Start menu, type cmd, and press Enter. In the black command window that opens, type whoami and press Enter. Your username will appear on the next line.

On a Mac, open Spotlight by pressing Command + Space, type Terminal, and press Enter. Type whoami and press Enter. Your username appears below. On Linux, open a terminal and type the same command: whoami.

If you prefer not to use the command line, you can also find your username by looking at your user folder. On Windows, open File Explorer and look at the path bar at the top — it usually shows C:\Users\[YourUsername]. On a Mac, open Finder, click the house icon in the sidebar, and the folder name is your username.

Key Takeaways

  • The whoami command in Terminal (Mac/Linux) or Command Prompt (Windows) displays your username when ready.
  • On Windows, your username appears in the file path C:\Users\[YourUsername] when you open File Explorer.
  • On a Mac, your username is the name of your home folder, visible in Finder's sidebar.
  • Your username is different from your display name — the username is what the system uses, while the display name is what appears on the login screen.

Finding your username in Windows Settings

If you want to avoid the command line, Windows Settings shows your username clearly. Click the Start button, then click the gear icon to open Settings. Select Accounts from the left menu, then click Your info. At the top of the page, you will see your account name listed under your profile picture.

This method also shows you whether your account is a local account (stored only on your computer) or a Microsoft account (linked to an email address). If you see an email address instead of a straightforward username, that is your Microsoft account name, and your local username may be different. To find your local username, use the whoami command instead.

Finding your username on a Mac

The simplest way on a Mac is to click the Apple menu in the top-left corner and select System Settings (or System Preferences on older versions). Click General, then About. Look for the line that says Computer Name — this is not your username, but it is displayed nearby. Your actual username is easier to find in Finder: click the Finder icon in the dock, then look at the sidebar. Your home folder is labeled with your username.

You can also see your username at the top of the Finder window when you open your home folder. The path bar shows /Users/[YourUsername]. If you are still unsure, the Terminal method with whoami is the most reliable.

Finding your username on Linux

Linux systems store usernames in a few places. The fastest method is the Terminal command whoami, which works on any Linux distribution. If you want to see all user accounts on the system, type cat /etc/passwd in the Terminal — this shows a list of all usernames, though the output includes system accounts you may not recognize.

Your username also appears in the Terminal prompt itself. When you open a Terminal window, the prompt usually shows something like username@computername:~$. The part before the @ symbol is your username. This is the quickest visual check if you have a Terminal window already open.

Why you might need to know your username

Your username matters for several reasons. When you set up remote access to your computer, you need your username to log in from another device. If you are troubleshooting network or permission problems, support staff will ask for your username. Some software installations require you to enter your username to grant permission for changes.

Your username is also important for understanding file permissions and ownership. When you create files or folders, they are owned by your username. If you share a computer with other people, knowing your username helps you understand which files belong to which account and why you might not have permission to access certain folders.

The difference between username and display name

Many people confuse their username with their display name. Your display name is what appears on the login screen and in the top-right corner of your screen. Your username is what the operating system uses internally and what appears in file paths and Terminal commands. They can be completely different.

For example, your display name might be "Sarah Chen" but your username might be "schen" or "sarah.chen". When you use the whoami command, you get your username, not your display name. If you need to change either one, the process is different for each, and changing your display name does not change your username.

Frequently Asked Questions

Is my username the same as my email address?

Not always. If you use a Microsoft account on Windows or an Apple ID on a Mac, your account is linked to an email address, but your local username may be different. Use the whoami command to see your actual system username, which is what you need for most technical purposes.

Can I change my username?

Changing your username is possible but complicated on all operating systems, and it can break file permissions and software settings. On Windows, you can create a new account with a different name, but renaming an existing account requires administrative tools. On Mac and Linux, the process involves command-line tools. Most people find it easier to create a new account than to rename an existing one.

What if whoami doesn't work?

If the whoami command does not work, make sure you typed it correctly and pressed Enter. On Windows, make sure you opened Command Prompt (cmd), not PowerShell. If you still have trouble, use the Settings method instead — it does not require any commands and works the same way.

Do I need my username to log in?

On most modern computers, you log in with your display name or email address, not your username. However, some older systems, remote connections, and network logins do require your username. If you are setting up remote access or connecting to a server, you will need to know your username.