Skip to content

Groups

Add Group

Add ubuntu user to group docker

usermod -aG docker ubuntu

Flags:

-a: --append append the user to the supplemental GROUPS

-G: --groups GROUPS new list of supplementary GROUPS

Validate

Validate that the user has been added to the group:

tail -2 /etc/group
alex:x:1000:
docker:x:988:ubuntu