第一步:查明登陆端口和登陆人
[root@localhost liulangyu]# who
liulangyu :0 2015-07-22 03:03 (:0)
root pts/0 2015-07-23 00:27 (192.168.176.1)
liulangyu pts/1 2015-07-23 00:29 (:0)
root pts/2 2015-07-23 01:44 (192.168.176.1)
第二步:通知登陆用户将要关闭他
[root@localhost liulangyu]# echo “I will close your connection” > /dev/pts/2
第三步:关闭用户连接
[root@localhost liulangyu]# fuser -k /dev/pts/2
第四步:验证是否已经关闭
[root@localhost liulangyu]# who
liulangyu :0 2015-07-22 03:03 (:0)
root pts/0 2015-07-23 00:27 (192.168.176.1)
liulangyu pts/1 2015-07-23 00:29 (:0)
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.e1idc.net