add group to user centos 7 code example Example: how to create a user and add it to a group in linux useradd -G examplegroup exampleusername