whoami是操作系统中用于查看当前有效用户名的命令,这一命令为大部分类Unix操作系统以及Windows Vista、Windows 7、Windows 8、Windows Server 2003、Windows Server 2008与Windows Server 2012等操作系统所包含。命令whoami由英文单句“Who am I?(我是谁?)”连接而成,调用该命令时系统会输出当前用户的有效用户名,这一输出效果与Unix命令id-un是相同的。
Your whoami should return your login name.
您的whoami应该返回您的登录名称。
To find out, you can use the whoami command to return the name of the current user.
为找出答案,您可以使用 whoami 命令来返回当前用户的名称。
Here's another example, this time with the user name taken from the environment using whoami.
下面是另一个示例,这次的用户名来自于whoami的结果。
应用推荐