getent
system managementLinux/Unix
The getent command is one of the most frequently used commands in Linux/Unix-like operating systems. getent Get entries from administrative database
Quick Reference
Command Name:
getent
Category:
system management
Platform:
Linux/Unix
Basic Usage:
getent [options] [arguments]
Common Use Cases
Syntax
getent database [key...]
Options
Database | Description |
---|---|
passwd |
User account information |
group |
Group information |
hosts |
Host names and IP addresses |
services |
Network services |
protocols |
Network protocols |
networks |
Network names |
ethers |
Ethernet addresses |
rpc |
RPC program names |
netgroup |
Network groups |
aliases |
Mail aliases |
shadow |
Shadow password information (requires root privileges) |
gshadow |
Shadow group information (requires root privileges) |
Examples
How to Use These Examples
The examples below show common ways to use the getent
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
getent passwd