1.\" Copyright (c) 1986, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" %sccs.include.redist.roff% 5.\" 6.\" @(#)who.1 8.2 (Berkeley) 12/30/93 7.\" 8.Dd 9.Dt WHO 1 10.Os 11.Sh NAME 12.Nm who 13.Nd display who is logged in 14.Sh SYNOPSIS 15.Nm who 16.Op Ar am I 17.Op Ar file 18.Sh DESCRIPTION 19The utility 20.Nm who 21displays 22a list of all users currently logged on, showing for each user 23the login name, 24tty name, the date and time of login, and hostname if not local. 25.Pp 26Available options: 27.Pp 28.Bl -tag -width file 29.It Ar \&am I 30Returns the invoker's real user name. 31.It Ar file 32By default, 33.Nm who 34gathers information from the file 35.Pa /var/run/utmp . 36An alternate 37.Ar file 38may be specified which is usually 39.Pa /var/run/wtmp 40(or 41.Pa /var/run/wtmp.[0-6] 42depending on site policy as 43.Pa wtmp 44can grow quite large and daily versions may or may not 45be kept around after compression by 46.Xr ac 8 ) . 47The 48.Pa wtmp 49file contains a record of every login, logout, 50crash, shutdown and date change 51since 52.Pa wtmp 53was last truncated or 54created. 55.El 56.Pp 57If 58.Pa /var/log/wtmp 59is being used as the file, the user name may be empty 60or one of the special characters '|', '}' and '~'. Logouts produce 61an output line without any user name. For more information on the 62special characters, see 63.Xr utmp 5 . 64.Sh FILES 65.Bl -tag -width /var/log/wtmp.[0-6] -compact 66.It Pa /var/run/utmp 67.It Pa /var/log/wtmp 68.It Pa /var/log/wtmp.[0-6] 69.El 70.Sh SEE ALSO 71.Xr last 1 , 72.Xr users 1 , 73.Xr getuid 2 , 74.Xr utmp 5 75.Sh HISTORY 76A 77.Nm 78command appeared in 79.At v6 . 80