What is the command to delete a user in Linux?

What is the command to delete a user in Linux?
Answer
Remove a Linux user
  1. Log in to your server via SSH.
  2. Switch to the root user: sudo su –
  3. Use the userdel command to remove the old user: userdel user’s username.
  4. Optional: You can also delete that user’s home directory and mail spool by using the -r flag with the command: userdel -r user’s username.
 

Tìm kiếm

Back
Top