来源:http://itlab.idcquan.com/linux/administer/789537.html在准备下载服务器的数据库的时候,结果terminal连接数据库的时候卡住了,只好关掉terminal,新开一个重新登录。登录上去后查看之前的用户还在。查看当前服务器有多少用户
踢掉用户db2
[root@xxxx]# w
00:32:43 up 28 days, 23:33, 2 users, load average: 0.07, 0.03, 0.01
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 xxx.xxx.xxx.xxx 00:28 3:59 0.05s 0.01s db2
root pts/1 xxx.xxx.xxx.xxx 00:30 0.00s 0.01s 0.00s w
踢掉用户db2
[root@xxxx]# pkill -kill -t pts/0
[root@xxxx]# w
00:33:17 up 28 days, 23:34, 1 user, load average: 0.04, 0.03, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/1 xxx.xxx.xxx.xxx 00:30 0.00s 0.01s 0.00s w