id
Options
-A
-
id-help-audit
--user
,-u
-
id-help-user
--group
,-g
-
id-help-group
--groups
,-G
-
id-help-groups
-p
-
id-help-human-readable
--name
,-n
-
id-help-name
-P
-
id-help-password
--real
,-r
-
id-help-real
--zero
,-z
-
id-help-zero
--context
,-Z
-
id-context-help-enabled
Examples
Display current user's ID (UID), group ID (GID) and groups to which they belong:
id
Display the current user identity:
id {{[-un|--user --name]}}
Display the current user identity as a number:
id {{[-u|--user]}}
Display the current primary group identity:
id {{[-gn|--group --name]}}
Display the current primary group identity as a number:
id {{[-g|--group]}}
Display an arbitrary user's ID (UID), group ID (GID) and groups to which they belong:
id {{username}}
The examples are provided by the tldr-pages project under the CC BY 4.0 License.
Please note that, as uutils is a work in progress, some examples might fail.