userdel : Creating and Managing User Accounts
Creating and Managing User Accounts
userdel
From time to time, you will also need to remove a user account from your Linux system.
This can be done from the shell prompt using the userdel utility. To delete a user, simply
enter
userdel username
For example, if we wanted to delete the lmorgan account we created earlier, we would enter
userdel lmorgan
at the shell prompt.
It’s important to note that, by default, userdel will not remove the user’s home directory from
the file system. If you do want to remove the home directory when you delete the user, you need
to use the –r option in the command line. For example, entering
userdel –r lmorgan
will remove the account and delete her home directory.
LX0-104 Exam Objectives (K)
No comments:
Post a Comment