QuestionQ29

VerifiedServices and User Management

A Linux administrator needs to add a user to the Docker group while leaving the user's primary group unchanged. Which command should the administrator use to accomplish this task?

Explanation

usermod -aG docker user appends docker to the user's supplementary groups. The -g option changes the primary group, whereas -a used with -G preserves existing supplementary-group memberships.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!