When I type the command:

[root@degeneration Desktop]# who am i 
root     pts/0        2013-04-12 15:08 (:0.0)

What is pts/0 and what is meant by (:0.0)?

3 Answers 3


The pts/0 is telling you which "pseudo terminal" the user is logged in on. In this case it's terminal #0. The "(:0.0)" tells you which hostname and display you're using.

who am i is an alias of command who -m. See the man page for who. You can also read about the who command here.

The output can definitely be confusing to a Unix novice.


shows -m is same as am i

[root@grinch]$ who am i
root     pts/4        2013-04-12 07:10 (greeneggs.mydom.net)
[root@grinch]$ who -m
root     pts/4        2013-04-12 07:10 (greeneggs.mydom.net)

connected to some remote system

[sam@munger ~]$ who am i
sam      pts/0        2013-04-12 07:19 (

locally on my laptop

[saml@greeneggs ~]$ who am i
saml     pts/1        2013-04-11 16:41 (:0.0)

The last bit that still might be confusing you is the :0.0. This is how X Windows represents the "display" a user is on. The first "0" says which monitor/device you're on, the second "0" says which virtual display you're on.

This harks back to the days when computers were expensive and so multiple people might be working on the same computer all at the same time. I wouldn't worry about it, just remember that it's either going to be ":0.0" or possibly ":0". The environment variable "DISPLAY" and the command xhost make use of the ":0.0" value.

You can read more about remote displaying in Unix here.

whoami vs. who am i

Aren't they the same command? No they're different:

[saml@grinchy ~]$ ls -l /usr/bin/who /usr/bin/whoami
-rwxr-xr-x 1 root root 49432 Nov  3  2010 /usr/bin/who
-rwxr-xr-x 1 root root 26280 Nov  3  2010 /usr/bin/whoami

Also their output is completely different; whoami just shows you your effective userid while who am i shows you connection info about your terminal:

[saml@grinchy ~]$ who am i
saml     pts/0        2013-04-11 16:41 (:0.0)

[saml@grinchy ~]$ whoami

See the whoami man page here.

  • and also ` who am i ` is same as ` whoami `.
    – bagavadhar
    Apr 12, 2013 at 12:42
  • 4
    No it isn't, read the man page!
    – slm
    Apr 12, 2013 at 12:44
  • 1
    Another important difference is that sudo whoami output will not match sudo who am i.
    – ulidtko
    Jul 9, 2014 at 13:51

Quoting from here.

pts stands for pseudo terminal slave. A terminal (or console) is traditionally a keyboard/screen combination you sit and type at. Old UNIX boxes would have dozens of them hanging off the back, all connected with miles of cable. A pseudo terminal provides just the same facility only without the hardware. In other words, it's an xterm window or a konsole window, or whatever utility you use. They pop into life as you ask for them and get given sequential numbers: pts/0, then pts/1 and so on. The physical console is the hardware which is actually attached to your box - you probably only have one. That's labelled ":0" and is refered to as the actual "console".

  • 1
    :0 is only the term for the "console" in X.
    – depquid
    Apr 12, 2013 at 13:16

you will find pts/0 listed in who output if there is a remote connection to ssh:

I am one and the only on my machine:

$ who
me    :0           2015-02-02 14:06 (:0)
me    pts/7        2015-02-02 14:07 (:0)
me    pts/12       2015-02-02 14:07 (:0)

I am connected from other machine to ssh server, so I have opened remote terminal:

$ who
me    :0           2015-02-02 14:06 (:0)
me    pts/7        2015-02-02 14:07 (:0)
me    pts/12       2015-02-02 14:07 (:0)
me    pts/0        2015-02-02 14:31 (x.server.something.com)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.