Displaying user IDs
To display the system identifications (IDs) for a specified user, use the id command . The system IDs are numbers that identify users and user groups to the system.
The id command displays the following information, when applicable:
- User name and real user ID
- Name of the user's group and real group ID
- Name of the user's supplementary groups and supplementary group IDs, if any
id
uid=1544(sah) gid=300(build) euid=0(root) egid=9(printq) groups=0(system),10(audit)
In this example, the user has user name sah
with
an ID number of 1544
; a primary group name of build
with
an ID number of 300
; an effective user name of root
with
an ID number of 0
; an effective group name of printq
with
an ID number of 9
; and two supplementary group names
of system
and audit
, with ID numbers 0
and 10
,
respectively.
id denise
uid=2988(denise) gid=1(staff)
In this example, the user denise
has
an ID number of 2988
and has only a primary group
name of staff
with an ID number of 1
.
See the id command in the Commands Reference, Volume 3 for the complete syntax.