[kanchilug] 1D1C - getent

  • From: Dhanasekar <tkdhanasekar@xxxxxxxxx>
  • To: ilugc@xxxxxxxxxxxxx, kanchilug@xxxxxxxxxxxxx
  • Date: Sun, 7 Aug 2022 06:00:00 +0530

getent - The  getent  command  displays  entries from databases supported
by the
             Name Service  Switch  libraries

To Fetch the list of user accounts on a Linux system
$ getent passwd

To fetch details for a particular user
$ getent passwd user_name

To fetch a list of group accounts
$ getent group

To find the service name and its protocol
$ getent services 20
ftp-data              20/tcp

$ getent services 53
domain                53/tcp

$ getent services 22
ssh                   22/tcp

$ getent services 3306
mysql                 3306/tcp



regards,
T.Dhanasekar

Other related posts:

  • » [kanchilug] 1D1C - getent - Dhanasekar