Solve your UNIX Identity Crisis

Posted March 8, 2004 by Quinn McHenry in UNIX

Last Updated on

If you frequently login to multiple UNIX systems as different users, it is sometimes helpful to make sure you know who you are. The who command, in addition to telling you who else is online, can tell who is logged in to the console you are currently using and on what tty port.

To determine what user is logged in to your current session, in most flavors of UNIX, use the following command:

who -m

As a more memorable alternative, you can use the following:

who am i

In fact, most versions of who just look for two or more arguments; and if present, generate output equivalent to the -m option. Therefore, the following also will probably work and are a little like primitive Easter eggs:

who is the man
who wants cake
who mom likes


About Quinn McHenry

Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.
View more articles by Quinn McHenry

The Conversation

Follow the reactions below and share your own thoughts.

Leave a Reply