当我运行时,在在线命令行平台上,例如Codecademy上的平台
for cmd in w who whoami id
do
echo $cmd
$cmd
echo =========================
echo " "
done
我懂了
w
00:52:54 up 8 days, 14:10, 0 users, load average: 3.78, 2.98, 2.69
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
=========================
who
=========================
whoami
ccuser
=========================
id
uid=1000(ccuser) gid=1000(ccuser) groups=1000(ccuser)
=========================
注意只有whoami
和id
输出的东西有关。当我在计算机上运行相同的程序时,所有命令的结果都相似。
为什么不Codecademy网站为用户显示w
和who
?这些命令有什么不同?