2019-03-11 15:27:23 +00:00
|
|
|
|
# whoami
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
> 显示有关当前用户的详细信息。
|
2021-10-01 19:28:01 +01:00
|
|
|
|
> 更多信息:<https://docs.microsoft.com/windows-server/administration/windows-commands/whoami>.
|
2019-03-11 15:27:23 +00:00
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 显示当前用户的用户名:
|
2019-03-11 15:27:23 +00:00
|
|
|
|
|
|
|
|
|
`whoami`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 显示当前用户所属的组:
|
2019-03-11 15:27:23 +00:00
|
|
|
|
|
|
|
|
|
`whoami /groups`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 显示当前用户的权限:
|
2019-03-11 15:27:23 +00:00
|
|
|
|
|
|
|
|
|
`whoami /priv`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 显示当前用户的用户主体名称(UPN):
|
2019-03-11 15:27:23 +00:00
|
|
|
|
|
|
|
|
|
`whoami /upn`
|
|
|
|
|
|
2022-03-27 06:25:15 +01:00
|
|
|
|
- 显示当前用户的登录 id:
|
2019-03-11 15:27:23 +00:00
|
|
|
|
|
|
|
|
|
`whoami /logonid`
|