- Get list of all groups:getent group- See the members of a group:getenet group [group_name]- Get list of all services:getent services- Find a username by UID:getent passwd 1000- Perform a reverse DNS lookup:getent hosts [host]
getent [option]... database key...
The getent command displays entries from databases supported by the Name Service Switch libraries, which are configured in /etc/nsswitch.conf. If one or more key arguments are provided, then only the entries that match the supplied keys will be displayed. Otherwise, if no key is provided, all entries will be displayed (unless the database does not support enumeration).
The database may be any of those supported by the GNU C Library, listed below:
One of the following exit values can be returned by getent:
This page is part of release 4.09 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.