In this part, I will show you how to remove users from your Linux system.
1. COMMAND:
userdelDESCRIPTON:
delete a user account and related files
SYNOPSIS
userdel [options] LOGIN
OPTION:
-r, --remove
Files in the user's home directory will be removed along with the
home directory itself and the user's mail spool.
Example:
piniheaven@fish:~$ ls /home
jack piniheaven tom
piniheaven@fish:~$ sudouserdel jack #delete user account,but not delete files in the user's home directory
piniheaven@fish:~$ ls /home
jack piniheaven tom
piniheaven@fish:~$ sudouserdel -r tom #delete user account,and delete files in the user's home directory
piniheaven@fish:~$ ls /home
jack piniheaven
没有评论:
发表评论