I was looking for some shell commands, and I took a look in "users" command.
I was hoping to get only 1 name, but I got 2:
nori@nori-hidamari:~$ users nori nori And when I run the command "who"
nori@nori-hidamari:~$ who nori :0 2015-04-09 09:31 (:0) nori pts/0 2015-04-09 09:48 (:0) Is this behaviour normal? Or it's bad?
Thank you guys for helping me.
22 Answers
This is normal expected behaviour.
You see your user name twice because you are logged in twice.
[simmel]@[mars]$ users simmel simmel The second command
who shows which user is online right now and it looks like you were online at that time with Graphical Display :0 and pts/0 (a terminal window).
[simmel]@[mars]$ who simmel tty8 2015-03-30 11:15 (:0) simmel pts/3 2015-04-09 14:16 (:0) After opening some more terminals it looks like this:
[simmel]@[mars]$ who simmel tty8 2015-03-30 11:15 (:0) simmel pts/3 2015-04-09 14:16 (:0) simmel pts/4 2015-04-09 14:54 (:0) simmel pts/8 2015-04-09 14:54 (:0) After opening more windows the count goes up in users:
[simmel]@[mars]$ users simmel simmel simmel simmel 3It is normal. You will have an entry for the graphical desktop you have logged into (labeled with the corresponding DISPLAY - in this case :0), and one each for each terminal you have open (labeled with the pseudo-terminal corresponding to each of them (pts/X)). Since you're running this command in a terminal, you will of course have one entry corresponding to that terminal, hence a minimum of two.