When I type
who in terminal I get this output:
$USER tty2 2017-01-12 12:50 (:1)
What does this smiley
(:1) mean ?
Sometimes this smiley looks like
(:0.0). What does it mean in this case?
Where is an overview about these different brackets?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
info page (
info coreutils 'who invocation')
If given no non-option arguments, ‘who’ prints the following information for each user currently logged on: login name, terminal line, login time, and remote hostname or X display.
(:0) simply means X display number 0 on the localhost.
If there are remote users (for example SSH sessions) as well, you may see something like
$ who steeldriver tty7 2016-12-15 13:57 (:0) steeldriver pts/4 2017-01-12 09:32 (192.168.1.4)
As you can find out in the manpage by typing
man who, you can enable column headings with the
$ who -H NAME LINE TIME COMMENT bytecommander tty7 2017-01-12 15:26 (:0) guest-c62iz5 tty8 2017-01-12 15:40 (:1)
I have to agree this is not very helpful though, and the manpage also doesn't contain any explanation of the values.
However, I think I can tell you what these columns mean anyway:
NAMEis the username of each logged in user.
LINEseems to contain the TTY through which the user is logged in (TTY1-6 are terminals, TTY7-12 are used by the X display server to show graphical desktops; you switch between them using Ctrl+Alt+F1 - F12).
TIMEis the date and time when the user logged in to their current session.
COMMENT in our cases shows the content of the
$DISPLAY environment variable (normally
:0) in braces, which is also used by the X display server. Only graphical TTYs should have such a value, this column is empty for me on the terminal TTYs.