Results 1 to 4 of 4

Thread: username displays twice

  1. #1
    Join Date
    May 2008
    Beans
    1,029

    username displays twice

    If I type in a command in the terminal to display which users are logged on, my username appears twice:
    Code:
    :~$ users
    username username
    or
    Code:
    :~$ who -q
    username username
    # users=2
    I have only logged in once, why is it showing twice?

    Ubuntu 9.10 Karmic

  2. #2
    Join Date
    Jul 2007
    Location
    Davao
    Beans
    291
    Distro
    Ubuntu Development Release

    Re: username displays twice

    The users command shows the number of active sessions to the system. One refers to your graphical session, the other refers to the terminal session in which you entered your command.

    Try this: open another terminal, then run the users command again. See what comes out.

    The who command is more instructive, IMHO.
    Dominique Gerald M. Cimafranca
    Ubuntu Living

  3. #3
    Join Date
    Jun 2008
    Location
    Kerala, India.
    Beans
    284
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: username displays twice

    Linux is a multiuser operating system. It has 7 'virtual terminals' where 6 are CLI based and 1 is the normal GUI. So, typing Ctrl+Alt+F1 gets you into the 1st terminal....Ctrl+Alt+F6=6th terminal and Ctrl+Alt+F7=GUI mode. Different users can log in and work in each of these terminals.

    Now,typing 'who' gives me this output (I'm logged into 2 terminals.)
    Code:
    melvin@melvin-desktop:~$ who
    melvin   tty1         2010-04-15 10:53
    melvin   tty7         2010-04-15 10:39 (:0)
    melvin   pts/0        2010-04-15 10:59 (:0.0)
    tty1 = 1st CLI based terminal.
    tty7 = normal GUI interface.
    pts/0 = GNOME terminal from which I'm running the command!

    I opened another terminal and got this:
    Code:
    melvin   tty1         2010-04-15 10:53
    melvin   tty7         2010-04-15 10:39 (:0)
    melvin   pts/0        2010-04-15 10:59 (:0.0)
    melvin   pts/1        2010-04-15 11:02 (:0.0)
    Shows that I've 2 terminals open!
    Have a nice day!
    My PC: AMD Phenom II X4 960T 3GHz, 8GB RAM, 500GB WD SATA HDD, 160 GB WD PATA HDD (slave), AMD 880G chipset, AMD Radeon 6450 graphics + 1GB DDR3 video memory

  4. #4
    Join Date
    May 2008
    Beans
    1,029

    Re: username displays twice

    Interesting, thank you very much. I thought there was something wrong with my installation.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •