Creating a Group
- Use
groupaddas the root user. - Requires only the group name.
# Specify Group ID (GID) - Use -g to assign a custom GID
groupadd -g 1212 alamgir
# Automatic GID Assignment
groupadd auto
#Verify Group Creation
grep auto /etc/group
Key Point
- If
-gis not used, Linux assigns the next available GID. - GIDs are auto-incremented based on existing entries in
/etc/group.
