Get Linux Group Id Fom Group Name

Last modified: 
Thursday, April 9th, 2015
Topics: 
Linuxsysadmin

A method to suss out the gid for a given group by name.

cat /etc/group | grep [groupname]

Example

cat /etc/group | grep www-data
www-data:x:33:


The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.