How To Create Group And User In Linux Or How To Delete Them

In This Tutorial We Are going To Learn How To Create Group And User In Linux And How To Add User In Group And How To Delete Group And User Or How To Check Group And User Information

Now Firstly Login In Linux With Root

Now How To Add Group In Linux 

#groupadd linux {linux IS The Group Name}
#cat /etc/group {To Check The Group IS Created Or Not}

Now How To Add User In Linux

#useradd p1 {p1 IS The User Name}
#useradd p2 {p2 IS The User Name}

Now How To Insert User In Group 

#usermod -G linux p1  {linux Is The Group Name And p1 IS User} 
#usermod -G linux p2  {linux Is The Group Name And p1 IS User}

Now How To Check User IS Inserted In Group Or Not 


#cat /etc/group {To Check Group Info}

Now How To Take Out Any One User From The Group 

#gpasswd -d p1 linux {p1 Is The User And linux IS Group}

How To Delete Group In Linux ?

#groupdel linux {linux IS Group Name}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s