Linux is死进程,linux杀死进程报错问题

本地创建了两个账号,text和text1

现在欲删除text1用户,执行如下

[text1@localhost /]$ su text

Password:

[text@localhost /]$ su

Password:

[root@localhost /]# userdel text1

userdel: user text1 is currently used by process 55462

出现了报错,提示text1有程序正在运行,无法删除此用户

那就结束这个用户的所有进程吧

[root@localhost /]# killall -u text1

Session terminated, killing shell...

Session terminated, killing shell...

Session terminated, killing shell...[root@localhost /]#  ...killed.

...killed.

...killed.

You have new mail in /var/spool/mail/root

[text1@localhost root]$ [text1@localhost /]$ [text1@localhost Desktop]$

[root@localhost /]#

这里本来以为结束成功,于是就进行了下一步,继续删除用户

[root@localhost /]# userdel text1

userdel: user text1 is currently used by process 55462

[root@localhost /]# exit

依旧报错,看来还是没有结束text1用户的进程

刚才不是执行结束进程的命令了吗?仔细回去查了一下返回的信息,发现应该是没有成功

注意到中间有一句话:You have new mail in /var/spool/mail/root

查询资料找到了解决办法,切换到root输入

[root@localhost Desktop]# echo "unset MAILCHECK">> /etc/profile

那么继续

[root@localhost Desktop]# killall -u text1

[root@localhost Desktop]# userdel text1

[root@localhost Desktop]# su text

[text@localhost Desktop]$ su

Password:

[root@localhost Desktop]# su text1

su: user text1 does not exist

大功告成~

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值