cmdxray / commands / groupadd

What does groupadd do?

create a new group.

▸ Explain your own groupadd command →

groupadd examples, explained

$ groupadd docker

  • groupaddcreate a new group
  • dockeran argument passed to the command

$ groupadd -g 1005 staff

  • groupaddcreate a new group
  • -gspecific numeric group ID
  • 1005value for -g
  • staffan argument passed to the command

$ groupadd -r sysgrp

  • groupaddcreate a new group
  • -rcreate a system group
  • sysgrpan argument passed to the command

groupadd flags & options

-gspecific numeric group ID
-rcreate a system group
-fexit successfully if the group already exists
-oallow creating a group with a duplicate (non-unique) GID
--systemcreate a system group
--gidspecific numeric group ID

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.