Skip to content

Userdel command on Linux (remove user)

The userdel command on Linux removes a particular user’s account from the system. It removes the account from the /etc/passwd, /etc/shadow, and /etc/group files.

The available option is:

  • -r: Removes the user’s home directory along with their account.
  • -f: Forces the user to be removed even if the user is logged in

Example:

# userdel —r Arthur

Learn much more about Linux in our online course. You can register here. If you already have an account, or want to create one, just log in or create your user here.

Did you like it?

Share