2014年3月19日星期三

Linux Commands for Beginners lesson 7 -- userdel command

In this part, I will show you how to remove users from your Linux system.

1. COMMAND:
     userdel
  DESCRIPTON:
     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

没有评论:

发表评论