Skip to main content

Users and Groups

Groups define permission sets shared among users. Primary group is assigned at login; supplementary groups allow additional access.

Creating a Group

Input:

groupadd ops

Creates group ops.

References:

Adding User to a Group

Input:

usermod -aG ops alice

Adds alice to supplementary group ops.

References:

Listing User Groups

Input:

id alice

Output:

uid=1001(alice) gid=1001(alice) groups=1001(alice),1002(ops)

Shows UID, primary group, and supplementary groups.

References: