2025-03-14 21:59:59 -06:00
|
|
|
# id
|
|
|
|
|
|
|
|
|
|
> Display current user and group identity.
|
|
|
|
|
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/id-invocation.html>.
|
|
|
|
|
|
|
|
|
|
- Display current user's ID (UID), group ID (GID) and groups to which they belong:
|
|
|
|
|
|
|
|
|
|
`id`
|
|
|
|
|
|
|
|
|
|
- Display the current user identity:
|
|
|
|
|
|
2025-03-19 19:23:44 -06:00
|
|
|
`id {{[-un|--user --name]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Display the current user identity as a number:
|
|
|
|
|
|
2025-03-19 19:23:44 -06:00
|
|
|
`id {{[-u|--user]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Display the current primary group identity:
|
|
|
|
|
|
2025-03-19 19:23:44 -06:00
|
|
|
`id {{[-gn|--group --name]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Display the current primary group identity as a number:
|
|
|
|
|
|
2025-03-19 19:23:44 -06:00
|
|
|
`id {{[-g|--group]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Display an arbitrary user's ID (UID), group ID (GID) and groups to which they belong:
|
|
|
|
|
|
|
|
|
|
`id {{username}}`
|