命令:

w

[root@centos1 usr]# w
 14:05:11 up  3:55,  3 users,  load average: 0.00, 0.05, 0.23
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/0    10.111.22.247    10:13    0.00s  8.67s  0.00s w
root     pts/1    10.121.21.63     13:14    4:12  49.85s 26.66s -bash
root     pts/2    10.121.21.63     13:40   15:04   0.30s  0.30s -bash


who

[root@centos1 usr]# who
root     pts/0        2015-02-03 10:13 (10.111.22.247)
root     pts/1        2015-02-03 13:14 (10.121.21.63)
root     pts/2        2015-02-03 13:40 (10.121.21.63)