linux注销当前用户_Linux注销其他登录用户或注销登录意外被断开用户

更新时间:2019-07-14    来源:linux    手机版     字体:

【www.bbyears.com--linux】

经常在操作Linux的时候,偶尔会发生断网或是在智能多线路环境中操作服务器时,时常被断开,但用户登录的进程又在,并没有退出。

简单的方法实现已经登录的用户注销操作

 代码如下

[root@kiccleaf ~]# who
root     pts/1        2014-06-04 12:07 (27.115.*.*)
root     pts/2        2014-06-04 13:31 (58.247.*.*)
root     pts/3        2014-06-04 13:42 (58.246.*.*)
root     pts/4        2014-06-04 13:56 (140.207.*.*)
root     pts/5        2014-06-04 14:01 (140.207.*.*)

#结束掉一些登录的用户

[root@kiccleaf ~]# pkill -kill -t pts/1

杀死且注销用户

 代码如下

#skill -KILL -u xindongfang

本文来源:http://www.bbyears.com/caozuoxitong/58034.html