I am asking this question because, while there are many answers on the internet showing that who -a
is an option, nobody explains how to read the output. If you could provide a link to an online site that explains this, that would be equally an awesome answer. Here is an example of what I would like to decipher:
[bo@hostname ~]$ who -a
Jun 17 03:47 590 id=si term=0 exit=0
system boot Jun 17 03:47
run-level 3 Jun 17 03:47 last=S
Jun 17 03:48 4424 id=l3 term=0 exit=0
LOGIN tty1 Jun 17 03:48 5503 id=1
LOGIN tty2 Jun 17 03:48 5504 id=2
LOGIN tty3 Jun 17 03:48 5505 id=3
LOGIN tty4 Jun 17 03:48 5506 id=4
LOGIN tty5 Jun 17 03:48 5507 id=5
LOGIN tty6 Jun 17 03:48 5508 id=6
pts/0 Oct 19 16:27 15250 id=ts/0 term=0 exit=0
bo + pts/1 Oct 23 12:24 . 19776 (10.10.10.93)
pts/2 Oct 23 13:07 8551 id=ts/2 term=0 exit=0
pts/3 Oct 22 10:36 5813 id=ts/3 term=0 exit=0
pts/4 Oct 10 09:06 13002 id=ts/4 term=0 exit=0
Best Answer
As you can find from
man who
So let's look in details:
this is string
system boot Jun 17 03:47
this is strings with
exit=0
at the endthis is login ttys (strings with
LOGIN
in the beginning)this
this is
run-level 3 Jun 17 03:47 last=S
next one is
this two string
Hope now it is more clear how to parse this output.