5

Linux常用命令-44:userdel

 2 years ago
source link: https://xugaoxiang.com/2022/06/13/linux-cmds-44-userdel/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

userdel 命令用于删除指定的用户及与该用户相关的文件。同时,也修改了系统的用户账号文件 /etc/passwd/etc/shadow 以及 /etc/group 文件。

语法格式:userdel [参数] [用户名]

常用参数:

93dd2fb12dce502c.png
# 删除账号xugaoxiang
userdel xugaoxiang

# 删除用户,同时将其家目录一起删除,/home/xugaoxiang
userdel -r xugaoxiang

# 强制删除用户
userdel -f xugaoxiang

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK