0

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!

1

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

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

SYNOPSIS
       users [OPTION]... [FILE]

DESCRIPTION
       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‐
       mon.

       --help display this help and exit

       --version
              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 :)

  • thanks! sorry I'm quite new. Since now I always use man. I promise :P – user184026 Aug 14 '13 at 13:15
1

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
  • @Oli I lost the race it seems :-) – l3dx Aug 14 '13 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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