Thursday, November 21, 2024
HomeUNIXSolve your UNIX Identity Crisis

Solve your UNIX Identity Crisis

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

Quinn McHenry
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.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

LATEST REVIEWS

Recent Comments

error: Content is protected !!