Your Question: How Add and Remove User in Linux?

Your Question: How Add and Remove User in Linux?
Contents

How do I add a user in Linux?

To add/create a new user, all you’ve to follow the command ‘useradd’ or ‘adduser’ with ‘username’. The ‘username’ is a user login name, that is used by user to login into the system.

How do I remove a user in Linux?

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.
Sophia Al-Mansoor
Author

Sophia Al-Mansoor

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.