查看当前登陆用户:
w
1 2 3 4 5 |
[root@banana ~]# w 16:32:14 up 31 days, 1:43, 2 users, load average: 0.00, 0.01, 0.00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root tty1 :0 04Jan15 31days 22.68s 22.68s /usr/bin/Xorg : root pts/0 192.168.1.1 16:31 0.00s 0.04s 0.01s w |
比较逗趣的是可以给用户发信息
机器一
1 2 3 4 5 6 7 8 9 |
[root@banana ~]# w 16:55:07 up 31 days, 2:06, 3 users, load average: 0.00, 0.00, 0.00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root tty1 :0 04Jan15 31days 22.69s 22.69s /usr/bin/Xorg : root pts/0 IP2 16:31 6.00s 0.04s 0.04s -bash root pts/1 IP1 16:53 0.00s 0.04s 0.01s w [root@banana ~]# write root pts/0 hello world #ctrl+c退出输入 |
机器二
1 2 3 4 |
[root@banana ~]# Message from root@banana.ctbj.com on pts/1 at 16:58 ... hello world EOF |