一、输入w命令查看已登录用户信息(who)

[root@KW_S01_192.168.1.106_A ~]# w
19:22:31 up 2:11, 3 users, load average: 0.00, 0.00, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 192.168.1.178 18:41 0.00s 0.16s 0.01s w
root pts/1 192.168.1.178 19:22 4.00s 0.14s 0.05s ssh localhost
root pts/2 localhost.locald 19:22 4.00s 0.07s 0.07s -bash

二、使用命令pkill -kill -t 用户tty
[root@KW_S01_192.168.1.106_A ~]# pkill -kill -t pts/2

标签: none 阅读量: 1244

评论已关闭