linux 踢用户下线

 

第一种
[root@localhost bin]# who
root     tty1         2022-12-15 21:24
root     pts/0        2022-12-15 15:04 (192.168.20.65)
[root@localhost bin]# pkill -kill -t  tty1

第二种
[root@localhost bin]# ps -aux | grep tty1 root 26045 0.0 0.0 115548 3260 tty1 Ss+ 21:24 0:00 -bash root 26084 0.0 0.0 112820 2304 pts/0 S+ 21:25 0:00 grep --color=auto tty1 [root@localhost bin]# kill -9 26045

 

posted @ 2022-12-15 21:28  不会跳舞的胖子  阅读(125)  评论(0编辑  收藏  举报