在shell中,通过who能看到有哪些用户连接了本机,管理员希望断掉一些用户如何操作

rt...
2026年09月25日 01:48
有2个网友回答
网友(1):

用who命令可以看到用户的tty,比如是tty2
pkill -kill -t tty2
就可以踢出那个用户

网友(2):

$ who
ann tty7 2011-09-25 14:12 (:0)
ann pts/0 2011-09-25 14:12 (:0.0)
ann pts/1 2011-09-25 14:18 (annmato-iphone.local)
$ pkill -kill -t pts/1
$ who
ann tty7 2011-09-25 14:12 (:0)
ann pts/0 2011-09-25 14:12 (:0.0)