who and whoami: Two more quick Five Ws

After the rampant indecision of whatis, whereis and which, even more uncertainty is addressed by who and whoami.

Only this time, there’s a better sense of uniformity between the two. But that should also be expected, since both who and whoami are part of that magical package called coreutils. Regardless, this will be quick.

who, as you might imagine, shows users logged in at the moment, when they signed in, and from what console.

kmandla@6m47421: ~$ who
kmandla  tty1         2014-06-28 05:08

who can show a little more information, which is probably a good idea.

kmandla@6m47421: ~$ who -a -H
NAME       LINE         TIME             IDLE          PID COMMENT  EXIT
           system boot  2014-06-28 05:08
kmandla  - tty1         2014-06-28 05:08 08:02         180

In this case, the -a flag prods who for the most information available, and the -H supplies the header line. So you know what you’re looking at, of course. đŸ˜‰

whoami, in case you thought it impossible, is even simpler. It only does one thing — reminds you who you are — and its only options are --version and --help … and --help isn’t hard to figure out.

kmandla@6m47421: ~$ whoami
kmandla

As if I didn’t know that. O_o

I debated leaving these tools out, since they’re from the same package and the latter one is hardly worth mentioning. But you never know, perhaps this post will help someone with their identity crisis some day. … :mrgreen:

2 thoughts on “who and whoami: Two more quick Five Ws

  1. Gineaser

    There is a nicely tool ‘w’

    [12:49] ~ [gin@enginex-book]
    $ w
    12:49:32 up 2:19, 4 users, load average: 0,23, 0,20, 0,32
    USER TTY LOGIN@ IDLE JCPU PCPU WHAT
    gin :0 10:30 ?xdm? 27:18 0.06s /bin/sh /usr/bin/startkde
    gin pts/0 10:30 2:19m 0.00s 1.83s kdeinit4: kded4 [kdeinit]
    gin pts/1 11:59 47:24 0.03s 0.01s ssh citadmin@example.com
    gin pts/2 12:02 4.00s 0.05s 0.00s w

  2. Pingback: whowatch: Don’t just take my word for it | Inconsolation

Comments are closed.