I've recently been creating new users and assigning them to certain groups. I was wondering if there is a command that shows all the users assigned to a certain group?I have tried using the 'groups' command however whenever I use this it says 'groups: not found'
How can I find out which users are in a group within Linux?
users;group
You can use grep:grep 'group_name_here' /etc/groupThis only lists supplementary group memberships, not the user who have this group as their primary group. And it only finds local groups, not groups from a network service such as LDAP.