getent

Get entries from Name Service Switch libraries. More information: <https://manned.org/getent>.

Install

All systems
curl cmd.cat/getent.sh
Debian Debian
apt-get install libc-bin
Ubuntu
apt-get install libc-bin
Arch Arch Linux
pacman -S glibc
image/svg+xml Kali Linux
apt-get install libc-bin
CentOS
yum install glibc-common
Fedora
dnf install glibc-common
Windows (WSL2)
sudo apt-get update sudo apt-get install libc-bin
Raspbian
apt-get install libc-bin

Get entries from Name Service Switch libraries. More information: <https://manned.org/getent>.

  • Get list of all groups:
    getent group
  • See the members of a group:
    getent group group_name
  • Get list of all services:
    getent services
  • Find a username by UID:
    getent passwd 1000
  • Perform a reverse DNS lookup:
    getent hosts host

© tl;dr; authors and contributors