48 lines
1.0 KiB
Groff
48 lines
1.0 KiB
Groff
.\" @(#)whoami.1 1.1 94/10/31 SMI;
|
|
.TH WHOAMI 1 "9 September 1987"
|
|
.SH NAME
|
|
whoami \- display the effective current username
|
|
.SH SYNOPSIS
|
|
.B whoami
|
|
.IX "whoami command" "" "\fLwhoami\fP \(em display effective user name"
|
|
.IX display "effective user name \(em \fLwhoami\fP"
|
|
.IX user "display effective name" "" "display effective name \(em \fLwhoami\fP"
|
|
.IX login "display effective user name" "" "display effective user name \(em \fLwhoami\fP"
|
|
.SH DESCRIPTION
|
|
.B whoami
|
|
displays the login name corresponding to the current
|
|
effective uer
|
|
.SM ID\s0.
|
|
If you have used
|
|
.BR su (1V)
|
|
to temporarily adopt another user,
|
|
.B whoami
|
|
will report the login name associated with
|
|
that user
|
|
.SM ID\s0.
|
|
.B whoami
|
|
gets its information from the
|
|
.B geteuid()
|
|
and
|
|
.B getpwuid()
|
|
library routines (see
|
|
.BR getuid (2V)
|
|
and
|
|
.BR getpwent (3V),
|
|
respectively).
|
|
.SH FILES
|
|
.PD 0
|
|
.TP 20
|
|
.B /etc/passwd
|
|
username data base
|
|
.TP
|
|
.B /etc/utmp
|
|
database of users currently logged in
|
|
.PD
|
|
.SH "SEE ALSO"
|
|
.BR su (1V),
|
|
.BR who (1),
|
|
.BR getuid (2V),
|
|
.BR getpwent (3V),
|
|
.BR utmp (5V)
|