Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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)?

share|improve this question

The pts/0 is telling you which "psuedo 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 just another way of saying the 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.


show's -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 hearkens back to when computers were expensive and so multiple people might be 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.

share|improve this answer
and also ` who am i ` is same as ` whoami `. – Naai Sekar Apr 12 '13 at 12:42
No it isn't, read the man page! – slm Apr 12 '13 at 12:44
Another important difference is that sudo whoami output will not match sudo who am i. – ulidtko Jul 9 '14 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".

share|improve this answer
:0 is only the term for the "console" in X. – depquid Apr 12 '13 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 (michael-x360.devserver.sytelco.com)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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