Getent is a
shortcut for get Entries. This gets the details from administrative databases. These
databases can be passwd, group, hosts, ip nodes, services, protocols, ethers
and network e.t.c
The General Syntax will be
getent [group|hosts|networks|passwd|protocols|services] [keyword]
The General Syntax will be
getent [group|hosts|networks|passwd|protocols|services] [keyword]
[root@vx111a
~]# getent passwd root
root:x:0:0:root:/root:/bin/bash
root:x:0:0:root:/root:/bin/bash
[root@vx111a ~]# getent group bin
bin:x:1:root,bin,daemon
[root@vx111a ~]# getent services 80
http 80/tcp www www-http
[root@vx111a test]# getent services mail
smtp 25/tcp mail
[root@vx111a test]# getent services domain
domain 53/tcp
Happy learning :-)