Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

What does the command "users" do?

I don't really get it :( "groups" lists all groups. But "users" not all users.

I hope you can help me :) Thanks in advance!

share|improve this question

It prints the users who are logged in. It is a stripped down version of tools like w and who.

       users - print the user names of users currently logged in to the
       current host

       users [OPTION]... [FILE]

       Output who is currently logged in according to FILE.  If FILE is
       not specified, use /var/run/utmp.  /var/log/wtmp as FILE is com‐

       --help display this help and exit

              output version information and exit

Source: man users

groups does not list all groups, it lists the groups that the current user is in. Perhaps some man groups would help you too :)

share|improve this answer
thanks! sorry I'm quite new. Since now I always use man. I promise :P – user184026 Aug 14 '13 at 13:15

Whenever wondering about what a command does and can do; check its man page

How? Try this in a shell.

$ man command-name

Doing this for the users command will tell you

users  -  print the user names of users currently logged in to the
          current hos
share|improve this answer
@Oli I lost the race it seems :-) – l3dx Aug 14 '13 at 13:16
thank you :) will do that! – user184026 Aug 14 '13 at 13:16

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.