What are other userdel options?

QuestionsQuestions8 SkillsProUser Account ManagementDec, 03 2025
048

The userdel command has several options that can be useful for managing user accounts. Here are some common options:

  1. -r: Remove the user's home directory and mail spool along with the user account.

  2. -f: Force the removal of the user account, even if the user is logged in or has running processes.

  3. -Z: Remove any SELinux user mapping for the user being deleted.

  4. --help: Display help information about the userdel command and its options.

  5. --version: Show the version information of the userdel command.

Example Usage:

  • To forcefully delete a user named "alice" and remove her home directory:
    sudo userdel -rf alice

Always refer to the manual page (man userdel) for more detailed information on these options and their usage.

0 Comments

no data
Be the first to share your comment!