Replace gid linux8/31/2023 If you list files owned by a deleted group, you’ll see the group id (GID) instead of group name. It simply removes the group name from the system. The groupdel command doesn’t change the group ownership of any files. Keep in mind: Files belonging to the deleted group will not change group ownership Delete the user using userdel command and then delete the group.Change the primary group of a user using usermod command.You cannot delete the primary group of an existing user. Groupdel: cannot remove the primary group of user ‘abhishek’ If you try to remove the primary group of an existing user, you should see an error like this: Keep in mind: You cannot delete primary group of a user without deleting the user How do you get the group name? You can list groups for a user or manually check all the groups present in your system by viewing the content of file /etc/group. sudo groupdel group_nameĭid you notice that I used sudo with the groupdel command? It’s because it is an administrative command and you need to be root or sudo user to run this command. The groupdel command is perhaps the simplest command in Linux with virtually no options (other than one for chroot).Īll you have to do is to specify the group name. ![]() It is used for deleting groups from your system. In this article, I’ll discuss another group management command which is groupdel. In an earlier article, I discussed the groupadd command which is used for adding new groups to your Linux system.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |