Skip to content

Instantly share code, notes, and snippets.

@hidakatsuya
Created April 14, 2024 09:14
Show Gist options
  • Save hidakatsuya/44c43ed85b3fcec94917223e28029b9b to your computer and use it in GitHub Desktop.
Save hidakatsuya/44c43ed85b3fcec94917223e28029b9b to your computer and use it in GitHub Desktop.
getent - get entries from administrative database, such as passwd and group
getent passwd
root:x:0:0 ...
...
getent passwd root
root:x:0:0 ...
getent hosts
127.0.0.1       localhost
...

Supported databases: ahosts ahostsv4 ahostsv6 aliases ethers group gshadow hosts initgroups netgroup networks passwd protocols rpc services shadow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment