CentOS 踢出已登录用户
root@CentOS~ ]w //*查看当前登陆的所有用户*//
05:57:16 up 10 min, 4 users, load average: 0.00, 0.23, 0.23
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root tty4 – 05:56 21.00s 0.11s 0.11s -bash
root tty5 – 05:56 26.00s 0.07s 0.07s -bash
root tty6 – 05:55 32.00s 0.17s 0.17s -bash
root pts/0 192.168.80.196 05:57 0.00s 0.12s 0.02s w
为了T出其他的两个用户tty5和tty6,则执行:skill -kill tty5和skill -kill tty6
[root@CentOS~ ]skill -kill tty5
[root@CentOS~ ]skill -kill tty6
[root@CentOS~ ]w
05:58:08 up 11 min, 2 users, load average: 0.00, 0.19, 0.21
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root tty4 – 05:56 1:13 0.11s 0.11s -bash
root pts/0 192.168.80.196 05:57 0.00s 0.16s 0.02s w
本文出自 蓝鹰博客,转载时请注明出处及相应链接。
本文永久链接: http://www.lanyingblog.com/blog/512.html