-
-
Notifications
You must be signed in to change notification settings - Fork 1
Linux getent Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to getent on Linux, covering Arch Linux, CachyOS, and other distributions including database lookups, user information, and system database queries.
Basic usage:
# Query passwd database
getent passwd username
# Shows user informationAll users:
# All users
getent passwd
# Shows all user entriesUser lookup:
# User information
getent passwd username
# Shows:
# - Username
# - Password (x)
# - UID
# - GID
# - GECOS
# - Home directory
# - ShellBy UID:
# By UID
getent passwd 1000
# Finds user by UIDGroup lookup:
# Group information
getent group groupname
# Shows group detailsGroup members:
# Group members
getent group users
# Shows group membersHost information:
# Host lookup
getent hosts hostname
# Shows host IP addressService lookup:
# Service lookup
getent services http
# Shows service informationCheck installation:
# getent is part of glibc
# Usually pre-installed
# Check getent
which getentThis guide covered getent usage, database lookups, and system database queries for Arch Linux, CachyOS, and other distributions.
- id Guide - User and group IDs
- User and Groups - User management
- Networking - Network configuration
-
getent Documentation:
man getent
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.