1.\" Copyright (c) 1991 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" the Institute of Electrical and Electronics Engineers, Inc. 6.\" 7.\" %sccs.include.redist.roff% 8.\" 9.\" @(#)id.1 5.2 (Berkeley) 08/05/91 10.\" 11.Dd "" 12.Dt ID 1 13.UC 14.Sh NAME 15.Nm id 16.Nd return user identity 17.Sh SYNOPSIS 18.Nm id 19.Op Ar user 20.Nm id 21.Fl G Op Fl n 22.Op Ar user 23.Nm id 24.Fl g Op Fl nr 25.Op Ar user 26.Nm id 27.Fl u Op Fl nr 28.Op Ar user 29.Sh DESCRIPTION 30The 31.Nm id 32utility displays the user and group names and numeric IDs, of the 33calling process, to the standard output. 34If the real and effective IDs are different both are displayed, 35otherwise only the real ID is displayed. 36.Pp 37If a 38.Ar user 39(login name or user ID) 40is specified, the user and group IDs of that user are displayed. 41In this case, the real and effective IDs are assumed to be the same. 42.Pp 43The options are as follows: 44.Bl -tag -width Ds 45.It Fl G 46Display all of the different group IDs (effective, real and supplementary) 47as white-space separated numbers. 48.It Fl g 49Display only the effective group ID as a number. 50.It Fl n 51Display the name of the user or group ID instead of the number. 52.It Fl r 53Display the real ID instead of the effective ID. 54.It Fl u 55Display only the effective user ID as a number. 56.El 57.Pp 58If any of the ID numbers cannot be mapped into names, the number is displayed 59instead. 60.Pp 61The 62.Nm id 63utility exits 0 on success, and >0 if an error occurs. 64.Sh SEE ALSO 65.Xr groups 1 , 66.Xr who 1 , 67.Xr whoami 1 68.Sh STANDARDS 69The 70.Nm id 71function is expected to conform to 72.St -p1003.2 . 73.Sh HISTORY 74The 75historic 76.Xr groups 1 77command is equivalent to: 78.Nm id Fl Gn Op Ar user . 79.Pp 80The 81.Nm 82command is 83.Ud . 84