getent is a Unix command that helps a user get entries in a number of important text files called databases.
The databases it searches in are: ahosts, ahostsv4, ahostsv6, aliases, ethers (Ethernet addresses), group, gshadow, hosts, netgroup, networks, passwd, protocols, rpc, services, and shadow.
The general syntax is: Thorsten Kukuk wrote the getent utility for the GNU C Library.
Fetch list of user accounts on a Unix system (stored in a database called 'passwd').
For example, if both local and LDAP name service are used for user accounts, the results will include all local and LDAP users: Fetch details for a particular user called joe: Fetch list of group accounts on a Unix system (stored in a database called 'group'):