If you employ the su command to switch to the Superuser account then the who am i command is used to display your original UID (or RUID, Real User ID). This command lists the user name, the terminal line, and the date and time logged in.

Note: The who am i command does not work on all distributions of Linux.

Command Format

who am i

Example

display your effective UID:

$ id
uid=120(chuck) gid=100(other)
$

display your real UID:

$ who am i
chuck console Oct 29 18:30 (omnilinux)
$