WHOAMI(1) — User’s Manual — 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 are logged in as the super-user, while ‘who am i’ does not since it gets its information from the /etc/utmp file.
FILES
/etc/passwdusername data base
SEE ALSO
Sun System Release 0.3 — 27 April 1983