Create a new user: 

adduser username 

replace username with the user that you want to create.

 

Give your user a password so that they can log in: 

passwd username 

You will be prompted to type in the password twice to confirm it. Now your new user is set up and ready for use! You can now log in as that user, using the password that you set up. 

 

Create a new group: 

groupadd groupname 

 

List users in group: 

getent group groupname 

 

Add a user to a group: 

usermod -a -G groupname username 

or this

gpasswd -a username groupname 

or add a user to multiple groups: 

usermod -a -G group1,group2,group3 exampleusername 

 

Delete user from group: 

gpasswd -d username groupname