Print the current user id and name. Same as id -un.

      whoami [options]

   --help      Display Help
   --version   Display program version info

The whoami utility has been obsoleted by the id(1) utility, and is equivalent to 'id -un'.
The command 'id -p' is suggested for normal interactive use.

The whoami utility displays your effective user ID as a name.

“The more the merrier” ~ John Heywood

Related macOS commands

last - indicate last logins of users and ttys.
mesg - display (or do not display) messages from other users.
users - Print login names of users currently logged in.
w - Show who is logged on and what they are doing.

Copyright © 1999-2024 SS64.com
Some rights reserved