whoami命令用于打印当前有效的用户名称,相当于执行id -un命令。
id -un
whoami(选项)
--help:在线帮助; --version:显示版本信息。
[root@linuxnb ~]# whoami root [root@linuxnb ~]# id -un root