WHOAMI(1) — USER COMMANDS
NAME
whoami − display effective current username
SYNOPSIS
whoami
DESCRIPTION
whoami displays the username of whoever is currently logged in. whoami works even if you’ve used su to pick up another username, while ‘who am i’ does not since it gets its information from the /etc/utmp file.
In other words,
whoami shows who you are now, while
who am i shows who you where when you logged in.
FILES
/etc/passwdusername data base
SEE ALSO
Sun Release 3.2 — Last change: 23 September 1985