Previous | Table of Contents | Next |
DESCRIPTION
The external whoami command displays the current effective user name of the terminal session on the tty. It displays who you are logged in as or who is logged in on the terminal in front of you.
The difference between whoami and who am i is whoami displays the correct information even if you have su'd. While who am i does not work because if user /etc/utmp. Actually, who am i displays your real user name and whoami displays your effective user name.
COMMAND FORMAT
The format of the whoami command follows.
whoami
RELATED COMMANDS
Refer to the who command described in Module 159.
RELATED FILES
The whoami command uses the /etc/passwd file for user information.
APPLICATIONS
You can use the whoami command to display who you are logged in as even if you have su'd to a new user name. You may want to check your user name before creating files; the whoami command assures you on who you think you are or are not.
TYPICAL OPERATION
If this activity you use the whoami command to display who you are logged in as on the system. Begin at the shell prompt.
Previous | Table of Contents | Next |