文章目录
- 1. whoami 命令说明
- 2. whoami 命令语法
- 3. whoami 命令示例
- 4. 总结
1. whoami 命令说明
whoami:用于显示当前用户名,功能与 id -un 相同。基本信息如下:
Usage: whoami [OPTION]...
Print the user name associated with the current effective user ID.
Same as id -un.
--help display this help and exit
--version output version information and exit
Report whoami bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
For complete documentation, run: info coreutils 'whoami invocation'
2. whoami 命令语法
whoami [OPTION]...
3. whoami 命令示例
没啥说的查看当前操作用户
whoami
4. 总结
whoami 用于显示当前操作系统的用户。