Solve your UNIX identity crisis

Contributor Icon Contributed by qmchenry Date Icon March 8, 2004  
Tag Icon Tagged: UNIX

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 you who you are logged in as and on what tty port.


To determine who you logged into your current session as in most flavors of UNIX, use the following command:

who -m

As a more memorable alternative, you can use:

who am i

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

who is the man
who wants cake
who mom likes

Previous recipe | Next recipe |
 

Viewing 2 Comments

 
close Reblog this comment
blog comments powered by Disqus