An alternative but less general question would be: How to use groupmod based on a group id?

man groupmod indicates a group can only be looked up by group name. This is seemingly a problem for groups that only have an id and not a name, see group with id == 999 below:

~$ id
uid=1000(brandon) gid=1000(brandon) groups=1000(brandon),999

2 Answers 2


Create a new group with specific gid. You can do this with groupadd and a small g:

groupadd -g 999 mygroup

I don't know if this was changed at some point, but -G is not a valid flag on my system. I had to use lowercase -g

 groupadd -g 999 mygroup

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .