Manging users in linux | manage users and groups

below is the most common user managment operation in linux:


create new user:

sudo useradd username

remove user: 

sudo userdel username


create a group

sudo groupadd mygroup


add user to group:

sudo usermod -a -G groupname username


check current user groups:



check another user groups

sudo groups username