Linux删除用户时报错 userdel: user (用户名) is currently used by process 10183(或其他代码)
[root@djx ~]# useradd cat //创建用户cat[root@djx ~]# id cat //查询用户id
uid=1001(cat) gid=1001(cat) groups=1001(cat)[root@djx ~]# userdel cat //删除用户cat
userdel: user cat is currently used by process 10183//提示cat用户有未结束的进程[root@djx ~]# ps -ef | grep 10183//查看10183进程状态
milan 101837998018:06 pts/100:00:00 bash
root 1225912147019:57 pts/300:00:00 grep --color=auto10183[root@djx ~]# kill -910183//强制杀死10183进程[root@djx ~]# userdel cat //重新删除用户cat[root@djx ~]# id cat //查询用户id信息
id: cat: no such user
如果提示还有其他进程,继续使用kill -9强制杀死其他进程