id - return user identity
id [ options ] [user]
If no user
operand is specified id
writes user and group IDs and the corresponding user and group names of the
invoking process to standard output. If the effective and real IDs do not match, both are written. Any supplementary groups the
current process belongs to will also be written.
If a user operand is specified and the process has permission, the user and group IDs and any supplementary group IDs of the
selected user will be written to standard output.
If any options are specified, then only a portion of the information is written.
- -n, --name
Write the name instead of the numeric ID.
- -r, --real
Writes real ID instead of the effective ID.
- This option is ignored.
- -g, --group
Writes only the group ID.
- -u, --user
Writes only the user ID.
- -G, --groups
Writes only the supplementary group IDs.
- -s, --fair-share
Writes fair share scheduler IDs and groups on systems that support fair share scheduling.
- Successful completion.
An error occurred.