linux查看在线用户并踢出用户
1、查看在线用户 w [qiao@qiao-linux ~]$ w 15:32:44 up 2:52, 1 user, load average: 6.75, 3.98, 2.55 USER TTY LOGIN@ IDLE JCPU PCPU WHAT qiao tty2 15:24 2:51m 0.03s 0.03s /usr/libexec/gnome-session-binary 2.查看用户登录历史 last [qiao@qiao-linux ~]$ last qiao tty2 tty2 Mon Jun 8 15:24 still logged in qiao tty2 tty2 Mon Jun 8 15:21 - 15:23 (00:02) qiao tty2 tty2 Mon Jun 8 12:41 - 15:21 (02:39) reboot system boot 5.6.15-300.fc32. Mon Jun 8 20:40 still running qiao tty2 tty2 Sun Jun 7 22:22 - down (09:57) reboot system boot 5.6.15-300.fc32. Mon Jun 8 06:21 - 08:19 (01:58) qiao pts/0 q Sun Jun 7 22:07 - down (00:13