Quickly add system or normal groups from the shell and control group IDs. 18.03.2026 | reading time: 2 min When he needs to add a new group on Linux, the `groupadd` command is the simplest, idempotent way to create normal or system groups and control their numeric IDs from the shell. Live example: add a named group Create a regular group with a specific GID: `sudo groupadd -g 2000 devops` then verify with `getent group devops` which shows `devops:x:2000:`; create a system group: `sudo groupadd -r nginx` then `getent group nginx` shows `nginx:x:101:` or a similarly low GID; add a user to the group: `sudo usermod -aG devops alice` and `getent group devops` then shows `devops:x:2000:alice`. Options that matter in scripts Use `-g GID` to set a specific numeric ID; add `-r` to create a system group inside distribution-defined GID ranges; `-o` allows non-unique GIDs when combined with `-g`; `-f` suppresses errors for already-existing groups and helps scripts succeed; `-K key=value` overrides defaults from `/etc/login.defs` for fine control. Practical caveats and safe edits Avoid hand-editing `/etc/group` when possible; `groupadd` updates system files correctly and respects NSS backends, while direct edits risk mismatches; if he must change members, prefer `gpasswd` or `usermod -aG` and use `getent group` to check changes across NSS and LDAP. Nearby commands to know Manage membership or cleanup with `gpasswd` and `groupdel`, query databases with `getent`, add users to a group with `usermod`, and switch a shell to a group with `newgrp` to test permissions immediately. Wrap up and next steps Group management is foundational for permission design; master `groupadd` and its options to keep accounts tidy, then explore related tools and pursue deeper certification such as CompTIA Linux+ or LPIC-1 with intensive exam preparation at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. setup utilities security scripting infrastructure