tldr/pages.zh/windows/whoami.md

25 lines
432 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# whoami
> 显示有关当前用户的详细信息。
> 更多信息:<https://docs.microsoft.com/windows-server/administration/windows-commands/whoami>.
- 显示当前用户的用户名:
`whoami`
- 显示当前用户所属的组:
`whoami /groups`
- 显示当前用户的权限:
`whoami /priv`
- 显示当前用户的用户主体名称UPN
`whoami /upn`
- 显示当前用户的登录 id:
`whoami /logonid`