Linux userdel command

|

What is the userdel Command?

To remove a user from your system, type this command, and the user will be deleted after execution.

Syntax:

userdel [options] username

Options:

  1. -r → This option deletes the user and also removes their home directory along with all files inside it.
    Example:
    userdel -r username
  2. -f → This option forcefully deletes the user, even if they are logged in or have running processes.
    Example:
    userdel -f username
  3. -Z → If SELinux is enabled, this option deletes any SELinux user mapping connected to that user.
    Example:
    userdel -Z username

Example: Delete a user


Command:

userdel prabha

Output:

No message appears in the terminal.

ONLINE WEB TOOLS

WhatIsMyIpAddress
Shorterner