userdel Linux Commands
What is Linux userdel Command?
Explanation
userdel COMMAND:userdel command is used by the root user to remove or delete a specific user account and files related to that user.
SYNTAX :
userdel [options] LOGIN
OPTIONS:
-f, --force |
This option forces to remove the user account, even if the user is still logged in. |
-h, --help |
Display help message and exit. |
-r, --remove |
Files in the user's home directory will be deleted along with the home directory. |
EXAMPLE:
-
userdel -r hiox
Output:
In the above example, the command removes the user account 'Hiox' and
deletes all files corresponding to that user from the home directory.