How to delete a group from server via commandline – Unix/Linux

What is a group in Linux?

This is a way to organize Linux users. The group membership is administrated by the file “/etc/group” which includes a list of groups and its members. We can also define a user in different groups. In this case that particular user can access files in different groups where it has access.

What’s the command to delete a particular group?

You can add a group by using the command ‘groupadd‘ and also you can manage the same group by using the ‘groupmems’ command. Here is a command to delete the group from system/server.

Syntax:

# groupdel $groupname

Example:
Creating a group

[root@localhost ~]# groupadd testgrp
[root@localhost ~]# grep testgrp /etc/group
testgrp:x:779:

Deleting a group

[root@localhost ~]# groupdel testgrp
[root@localhost ~]# grep testgrp /etc/group

That’s it 🙂

Related Links :
groupadd , groupmems, groupmod,

More:
ls, head, tail, top, ps, find, crontab

Arunlal Ashok

Sr. Linux Server Administrator. I'm managing Linux servers since 2012. I started this blog to share and discuss my ideas. Check My Profile in uPwork (oDesk) and create a job, if you need any administration help. Thanks!!

You may also like...

17 Responses

  1. some guy says:

    Thanks man, no bs right to the point, other websites have you skim through a 1000 word page jest to see how to do a simple task I didn’t want to learn all about users and groups I just couldn’t remember the groupdel command, it’s like backwards if you think about it should be delgroup “group you want to delete” but it didn’t work that way hummm lol, thanks again man…

  1. February 1, 2014

    […] refer: groupdel, groupmems, […]

  2. February 1, 2014

    […] groupdel, groupadd, groupmod, […]

  3. February 1, 2014

    […] Links: groupdel, groupmems, […]

  4. February 1, 2014

    […] Links: groupdel, groupmems, groupmod, […]

  5. February 1, 2014

    […] Links: groupdel, groupmems, groupmod, […]

  6. February 1, 2014

    […] Links: groupdel, groupmems, groupmod, useradd , […]

  7. February 1, 2014

    […] Links: chgrp, groupdel, groupmems, groupmod, useradd , usermod . More ls, head, tail, top, ps, find, […]

  8. February 1, 2014

    […] Links: chown, groupdel, groupmems, groupmod, useradd , usermod […]

  9. February 1, 2014

    […] groupdel, groupmems, groupmod, useradd , usermod , chgrp, chown, ls, head, tail, top, ps, find, […]

  10. February 1, 2014

    […] groupdel, groupmems, groupmod, useradd , usermod , chgrp, chown, ls, head, tail, top, ps, find, […]

  11. February 1, 2014

    […] groupdel, groupmems, groupmod, useradd , usermod , chgrp, chown, ls, head, tail, top, ps, find, […]

  12. February 1, 2014

    […] groupdel, groupmems, groupmod, useradd , usermod , chgrp, chown, ls, head, tail, top, ps, find, […]

  13. February 2, 2014

    […] groupdel, groupmems, groupmod, useradd , usermod , chgrp, chown, ls, head, tail, top, ps, find, […]

  14. February 5, 2014

    […] commands, groupdel, groupmems, groupmod, useradd , usermod , chgrp, chown, ls, head, tail, top, ps, find, […]

  15. February 7, 2014

    […] useful commands: groupdel, groupmems, groupmod, useradd , usermod , chgrp, chown, ls, head, tail, top, ps, find, crontab, ftp […]

  16. February 7, 2014

    […] useful commands: groupdel, groupmems, groupmod, useradd , usermod , chgrp, chown, ls, head, tail, top, ps, find, crontab ftp […]

Leave a Reply

Your email address will not be published. Required fields are marked *