deluser命令 – 删除用户账户
deluser命令来自英文词组“delete user”的缩写,其功能是用于删除用户账户。
语法格式:deluser [参数] 用户名
常用参数:
| --backup | 删除前备份用户家目录和邮件数据 |
| --backup-to | 设置指定目录进行备份 |
| --group | 删除用户组 |
| --quiet | 静默执行模式 |
| --help | 显示帮助信息 |
| --remove-all-files | 删除用户的所有文件 |
| --remove-home | 删除用户的主目录和邮件后台处理程序 |
| --version | 显示版本信息 |
参考示例
删除指定的用户账户:
[root@linuxcool ~]# deluser linuxcool
将用户从指定的管理用户组中移出:
[root@linuxcool ~]# deluser root linuxcool
删除指定的用户账户及相关所有文件:
[root@linuxcool ~]# deluser --remove-all-files linuxcool