Problem Statement
How do you add a user to a specific group in Linux?
Explanation
You can add a user to a group using the usermod command with the -aG option.
This ensures the user gets additional group permissions without removing existing ones. It’s common when granting sudo or docker access.
Code Solution
SolutionRead Only
sudo usermod -aG sudo vipul
Practice Sets
This question appears in the following practice sets: