usermod -g developers alice

Category: Administration

usermod -g developers alice

Change a user's primary group

Sets the primary group of user alice to developers, changing which group name appears in listings and owns new files. The -g flag takes a group name or ID, while -G manages supplementary groups. Existing files keep their old ownership until changed.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.