w、who和users工具,是查詢已登陸當前主機的用戶;另外finger -s 也一樣能查詢;側重點不同;請本身對比着看;畢竟簡單,這裏只是介紹 ;linux
[beinan@localhost ~]$ wbash
12:09:56 up 3:43, 7 users, load average: 0.16, 0.10, 0.04ssh
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHATide
beinan tty1 - 08:27 3:42m 3:09 0.00s /bin/sh /usr/X11R6/bin/startx工具
linuxsir tty2 - 10:03 2:06m 0.01s 0.01s -bashit
beinan pts/0 :0.0 11:36 1:09 0.15s 0.15s bashclass
beinan pts/1 :0.0 11:37 1:12 0.21s 0.21s bash登錄
beinan pts/2 :0.0 12:02 6:52 0.09s 0.09s bash查詢
beinan pts/3 :0.0 12:05 12.00s 0.11s 0.06s ssh xmbnnbdl@linuxsir.org -p 17007di
beinan pts/4 :0.0 12:06 0.00s 0.21s 0.00s w
[beinan@localhost ~]$ who
beinan tty1 Nov 2 08:27
linuxsir tty2 Nov 2 10:03
beinan pts/0 Nov 2 11:36 (:0.0)
beinan pts/1 Nov 2 11:37 (:0.0)
beinan pts/2 Nov 2 12:02 (:0.0)
beinan pts/3 Nov 2 12:05 (:0.0)
beinan pts/4 Nov 2 12:06 (:0.0)
[beinan@localhost ~]$ users
beinan beinan beinan beinan beinan beinan linuxsir