• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

groupdel: command not found

by admin

The groupdel command will delete groups from the /etc/group file. It does not delete user accounts that are members of the group. Exercise caution when deleting groups as a mistake can cause users to not be able to access resources.

Syntax

The syntax of the groupdel command is:

# groupdel [options] {group names}

The groupdel command is generally used to delete a group from the system if it is not the primary group of any existing user. The following command line shows how to delete a group named geek from the system using the groupdel command:

# groupdel geek

Before doing this, it’s a good idea to identify all files that have their group ID set to the given group, so you can deal with them later:

# find / -group geek -print

because groupdel does not change the group ownership of any files. It simply removes the group name from the system’s records. If you list such files, you’ll see a numeric group ID in place of a group name.

If you encounter below error while running the groupdel command:

groupdel: command not found

you may try installing the passwd package as shown below as per your choice of distribution.

Distribution Command
Debian apt-get install passwd
Ubuntu apt-get install passwd
Alpine apk add shadow
Arch Linux pacman -S shadow
Kali Linux apt-get install passwd
Fedora dnf install shadow-utils-2
Raspbian apt-get install passwd

Filed Under: Linux

Some more articles you might also be interested in …

  1. updatedb: command not found
  2. cpulimit Command Examples in Linux
  3. kpackagetool5: command not found
  4. MySQL Fails to Start Using systemctl On systemd Linux Distributions
  5. Understanding Variables in Bash Shell Under Linux
  6. zip Command Examples in Linux
  7. nixos-option: Command Examples in Linux
  8. How To Create A SSH Banner in CentOS/RHEL Server
  9. dm-tool: command not found
  10. What are different Samba Server Types

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright