Files
cheatsheet-tldr/tldr/id
2024-07-07 00:16:15 +00:00

34 lines
637 B
Plaintext

---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# id
> Display current user and group identity.
> More information: <https://www.gnu.org/software/coreutils/id>.
- Display current user's ID (UID), group ID (GID) and groups to which they belong:
`id`
- Display the current user identity:
`id -un`
- Display the current user identity as a number:
`id -u`
- Display the current primary group identity:
`id -gn`
- Display the current primary group identity as a number:
`id -g`
- Display an arbitrary user's ID (UID), group ID (GID) and groups to which they belong:
`id {{username}}`