Displays your login name.
whoami
The whoami command displays your login name. Unlike using the command who and specifying am i, the whoami command also works when you have root authority since it does not examine the /etc/utmp file.
Item | Description |
---|---|
/etc/passwd | Contains user IDs. |