who
查看当前系统中当前登录的帐户
$who
jiang :0 2016-10-13 08:55 (:0)
jiang pts/4 2016-10-13 09:03 (:0)
jiang pts/1 2016-10-13 09:00 (:0)
jiang pts/6 2016-10-13 09:59 (:0)
如果在tty7里$su
,那么$who
不会识别root,需要在tty1里登录$su root
,就可以在任何终端里执行$who
查看到root用户
$su
# who
jiang :0 2016-10-13 08:55 (:0)
jiang pts/1 2016-10-13 10:01 (:0)
#切换到tty1里登录root
$su
#再切换回来
# who
jiang :0 2016-10-13 08:55 (:0)
root tty1 2016-10-13 14:44
jiang pts/1 2016-10-13 10:01 (:0)
#切换到tty1里退出root
$exit
#再切换回来
# who
jiang :0 2016-10-13 08:55 (:0)
jiang pts/1 2016-10-13 10:01 (:0)