adduser at group linux code example Example 1: add user to group usermod -a -G examplegroup exampleusername Example 2: linux user groups groups $username