'\"macro stdmacro
.if n .pH g1.whoami @(#)whoami	40.6 of 8/10/89
.\" @(#)whoami.1 1.15 88/07/22 SMI;
.nr X
.if \nX=0 .ds x} whoami 1 "BSD Compatibility Package" "\&"
.if \nX=1 .ds x} whoami 1 "BSD Compatibility Package"
.if \nX=2 .ds x} whoami 1 "" "\&"
.if \nX=3 .ds x} whoami "" "" "\&"
.TH \*(x}
.SH NAME
\f4whoami\f1 \- display the effective current username
.SH SYNOPSIS
\f4/usr/ucb/whoami\f1
.SH DESCRIPTION
.P
\f4whoami\f1
displays the login name corresponding to the current
effective user
.SM ID\s0.
If you have used
\f4su\f1
to temporarily adopt another user,
\f4whoami\f1
will report the login name associated with that user
.SM ID\s0.
\f4whoami\f1
gets its information from the
\f4geteuid\f1
and
\f4getpwuid\f1
library routines
(see \f4getuid\f1 and \f4getpwent\f1, respectively).
.SH FILES
.PD 0
.TP 20
\f4/etc/passwd\f1
username data base
.PD
.SH "SEE ALSO"
\f4su\fP(1),
\f4who\fP(1)
in the \f2User's Reference Manual\f1.
.br
\f4getuid\fP(2),
\f4getpwent\fP(3)
in the \f2Programmer's Reference Manual\f1.
.Ee
