In the Linux system, a group is a collection of users which have the same permissions on files and directories. When working as system administrator, might need to get all members of a group. This tutorial shows how to do that in the Linux.
getent can be used to retrieve entries from database files in the
/etc directory such as
hosts, etc. For example, to get all members of a
sudo group, execute the following command:
getent group sudo | cut -d: -f4