1.whoami
例子:
[root@cs70-moban ~]# whoami
root
作用文档:
Usage: whoami [OPTION]...
Print the user name associated with the current effective user ID.
Same as id -un.
红线:whoami的作用是打印当前有效用户id
蓝框:whoami=id -un
[root@cs70-moban ~]# id -un
root
2.whoami 、who 、 who am i三者区别
who am i:
Usage: who [OPTION]... [ FILE | ARG1 ARG2 ]
Print information about users who are currently logged in.
打印当前登录用户名
who :
Usage: who [OPTION]... [ FILE | ARG1 ARG2 ]
Print information about users who are currently logged in.
这个命令重点是用来查看当前有哪些用户登录到了本台机器上