Blog Supporters Resume
Part time open-sourcerer, Linux enthusiast, Rust fanatic

Getting a group id on Linux

May 20, 2022

Simply run the command below replacing <group_name> with the actual group name you want to get the id from:

getent group <group_name> | cut -d : -f 3

Due to getent being provided by gcc (or musl, depending on your distro), you’ll most likely already have it available on your system