1. If this is an existing users

Syntax: usermod -a -G groupname username

For example: usermod -a -G sudo myadminaccount -> this will make myadminaccount belong to sudo group , this mean it can run sudo su – to becom a root.

2. For new user ( you haven’t created it yet)

Syntax: useradd -G groupname username

This will add a new username to a group name groupname