The getent CommandThe getent command is used to get a list of entries from a name service database. The information comes from one of the sources pointed to by the /etc/nsswitch.conf file. The syntax for the getent command is shown in the following code: getent database [key...] The options for the getent command are described in Table 12.10.
The getent command displays the entries of the specified database that match each of the keys. If no key is specified, then all entries are printed. The following example looks at the root entry of the passwd database: # getent passwd root root:x:0:1:Super-User:/:/sbin/sh |