How to list all users in a Linux group?

后端 未结 20 1282
春和景丽
春和景丽 2020-12-07 06:51

How do I list all members of a group in Linux (and possibly other unices)?

20条回答
  •  我在风中等你
    2020-12-07 07:50

    There is a handy Debian and Ubuntu package called 'members' that provides this functionality:

    Description: Shows the members of a group; by default, all members members is the complement of groups: whereas groups shows the groups a specified user belongs to, members shows users belonging to a specified group.

    ... You can ask for primary members, secondary members, both on one line, each on separate lines.

提交回复
热议问题