Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I execute users command, it output two users with same name. Why are there two users? I'm pretty sure that I created just one user.

i.e

username@Computer:~$ users

gives following output

username username
share|improve this question
    
Did you copy and paste those results? –  Jack Feb 4 '13 at 5:24
    
@JohnRambo he just cut out the actual username and computer name... –  Alvar Feb 4 '13 at 6:37

1 Answer 1

The users command prints the user names of users currently logged in to the current host, not the list of users you created on your computer.

In your case, it returns the same user name twice because you are probably logged in twice.

You can check by using the who command (show who is logged on):

felix@computer:~$ who
felix    pts/0        2013-02-04 06:40 (:0.0)
felix    pts/5        2013-02-04 06:42 (:0.0)
felix@computer:~$ users
felix felix

See the manual pages for more information (man 1 users).

share|improve this answer
    
I didn't logged in twice, it is by default. Why there are two users logged in anyway? –  TheKojuEffect Feb 4 '13 at 8:05
3  
Maybe because you have two open terminals? –  felix Feb 4 '13 at 8:20
2  
Run users in aterminal. Now open another terminal run it again (users). You can see incerase in number. –  totti Feb 4 '13 at 10:16

Your Answer

 
discard

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.