how to add a user to group in linux code example
Example 1: ubuntu add user to group
sudo usermod -a -G group username
Example 2: how to create a user and add it to a group in linux
useradd -G examplegroup exampleusername
sudo usermod -a -G group username
useradd -G examplegroup exampleusername