whoami Command Examples

Print the username associated with the current effective user ID. More information: https://www.gnu.org/software/coreutils/whoami.

whoami

sudo whoami