The userdel
command is used to delete the specified user and files related to the user. At the same time, the system user account files /etc/passwd
, /etc/shadow
and /etc/group
files are also modified.
Syntax format: userdel [parameter] [username]
Common parameters:
Example
# 删除账号xugaoxiang userdel xugaoxiang # 删除用户,同时将其家目录一起删除,/home/xugaoxiang userdel -r xugaoxiang # 强制删除用户userdel -f xugaoxiang
This article is reprinted from https://xugaoxiang.com/2022/06/13/linux-cmds-44-userdel/
This site is for inclusion only, and the copyright belongs to the original author.