Hi! If you're new here, you may want to subscribe to the Unix Tutorial RSS feed to get regular tips & tricks for all flavors of Unix. You can follow me on Twitter, too! Thanks for visiting!
If you know the name of a particular user on your Unix system and just want to confirm the primary Unix group (gid) of this individual, just use the id command:
$ id -g greys 115
If Unix group id (gid) for the user doesn't help you much and you're interested in the Unix group name, use this:
$ id -gn greys admins
If you want to get all the information about the user id and all the groups the user belongs to, it's easier to use the default id command:
$ id greys uid=1000(greys) gid=115(admins) groups=35(testgroup),115(admins)








1 comment so far ↓
[...] Finding the primary Uinx group a user belongs to [...]
Leave a Comment