Users
The whoami command
Tells which user you are working as right now.
Syntax
whoamiCopy-ready examples
$ whoamiWho am I?$ sudo whoamiCheck that sudo worksYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- After switching user with su, whoami returns the new user.
FAQ
Why know my user?
Many permission errors come from being the wrong user.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course