new copyright; att/bsd/shared
[unix-history] / usr / src / usr.bin / who / who.1
CommitLineData
5f487bdd
KB
1.\" Copyright (c) 1986 The Regents of the University of California.
2.\" All rights reserved.
abab0fe1 3.\"
5f487bdd
KB
4.\" %sccs.include.proprietary.roff%
5.\"
6.\" @(#)who.1 6.4 (Berkeley) %G%
daacd5f0
CL
7.\"
8.TH WHO 1 "%Q"
abab0fe1
KM
9.AT 3
10.SH NAME
11who \- who is on the system
12.SH SYNOPSIS
13.B who
14[ who-file ] [
15.B "am I"
16]
17.SH DESCRIPTION
daacd5f0 18\fIWho,\fP without any argument, reads the /var/run/utmp file,
90b37ef8
KB
19and lists the login name, terminal name, and login time for each
20user currently logged into the system. If a single argument is
daacd5f0
CL
21given, \fIwho\fP uses that file instead of /var/run/utmp. Typically,
22that file will be /var/log/wtmp, which contains a record of all
90b37ef8
KB
23the logins, logouts, crashes, shutdowns and time changes since it
24was created. In either case, each login will be listed with the
25user name, the terminal name (with "/dev/" suppressed), login date
26and time, and, if applicable, the host logged in from.
abab0fe1 27.PP
daacd5f0 28If /var/log/wtmp is being used as the file, the user name may be empty
90b37ef8
KB
29or one of the special characters '|', '}' and '~'. Logouts produce
30an output line without any user name. For more information on the
31special characters, see utmp(5).
abab0fe1 32.PP
90b37ef8
KB
33With two arguments, as in `who am I' (and also `who are you'),
34\fIwho\fP tells you who you are logged in as.
abab0fe1 35.SH FILES
90b37ef8 36.DT
daacd5f0 37/var/run/utmp
90b37ef8 38.br
daacd5f0 39/var/log/wtmp
abab0fe1 40.SH "SEE ALSO"
90b37ef8 41last(1), users(1), getuid(2), utmp(5)