Files
tldr/pages.zh/common/id.md

28 lines
497 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# id
> 显示当前用户和组的身份信息。
> 更多信息:<https://www.gnu.org/software/coreutils/id>。
- 显示当前用户的IDUID、组IDGID及其所属的组
`id`
- 显示当前用户的身份:
`id -un`
- 以数字形式显示当前用户的身份:
`id -u`
- 显示当前主要组的身份:
`id -gn`
- 以数字形式显示当前主要组的身份:
`id -g`
- 显示任意用户的IDUID、组IDGID及其所属的组
`id {{username}}`