Dictionary · Linux and Windows Commands
whoami
Identity · Beginner
Prints the user identity of the current terminal session. On Windows it can also show the domain and privileges.
It answers which account is about to run the next command. That check prevents an edit that looked safe until you notice you are the administrator.
Example: whoami prints ada on Linux, or a domain and user on Windows, for the account in this terminal.
Command
Platform: Windows, Linux, and macOS
whoami
The output is the effective account for this session. On Windows, whoami /groups shows group membership when you need more than the name.
Common misconception
- It shows the current login, not every account that exists on the system.