xref: /minix3/usr.bin/who/who.1 (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc.\"	$NetBSD: who.1,v 1.23 2014/12/26 01:43:58 christos Exp $
2b6d4a4c1SThomas Cort.\"
3b6d4a4c1SThomas Cort.\" Copyright (c) 1986, 1991, 1993
4b6d4a4c1SThomas Cort.\"	The Regents of the University of California.  All rights reserved.
5b6d4a4c1SThomas Cort.\"
6b6d4a4c1SThomas Cort.\" Redistribution and use in source and binary forms, with or without
7b6d4a4c1SThomas Cort.\" modification, are permitted provided that the following conditions
8b6d4a4c1SThomas Cort.\" are met:
9b6d4a4c1SThomas Cort.\" 1. Redistributions of source code must retain the above copyright
10b6d4a4c1SThomas Cort.\"    notice, this list of conditions and the following disclaimer.
11b6d4a4c1SThomas Cort.\" 2. Redistributions in binary form must reproduce the above copyright
12b6d4a4c1SThomas Cort.\"    notice, this list of conditions and the following disclaimer in the
13b6d4a4c1SThomas Cort.\"    documentation and/or other materials provided with the distribution.
14b6d4a4c1SThomas Cort.\" 3. Neither the name of the University nor the names of its contributors
15b6d4a4c1SThomas Cort.\"    may be used to endorse or promote products derived from this software
16b6d4a4c1SThomas Cort.\"    without specific prior written permission.
17b6d4a4c1SThomas Cort.\"
18b6d4a4c1SThomas Cort.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19b6d4a4c1SThomas Cort.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20b6d4a4c1SThomas Cort.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21b6d4a4c1SThomas Cort.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22b6d4a4c1SThomas Cort.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23b6d4a4c1SThomas Cort.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24b6d4a4c1SThomas Cort.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25b6d4a4c1SThomas Cort.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26b6d4a4c1SThomas Cort.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27b6d4a4c1SThomas Cort.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28b6d4a4c1SThomas Cort.\" SUCH DAMAGE.
29b6d4a4c1SThomas Cort.\"
30b6d4a4c1SThomas Cort.\"     @(#)who.1	8.2 (Berkeley) 12/30/93
31b6d4a4c1SThomas Cort.\"
32*0a6a1f1dSLionel Sambuc.Dd December 25, 2014
33b6d4a4c1SThomas Cort.Dt WHO 1
34b6d4a4c1SThomas Cort.Os
35b6d4a4c1SThomas Cort.Sh NAME
36b6d4a4c1SThomas Cort.Nm who
37b6d4a4c1SThomas Cort.Nd display who is logged in
38b6d4a4c1SThomas Cort.Sh SYNOPSIS
39b6d4a4c1SThomas Cort.Nm
40b6d4a4c1SThomas Cort.Op Fl abdHlmqrstTuv
41b6d4a4c1SThomas Cort.Op Ar file
42b6d4a4c1SThomas Cort.Nm
43b6d4a4c1SThomas Cort.Ar am i
44b6d4a4c1SThomas Cort.Sh DESCRIPTION
45b6d4a4c1SThomas CortThe
46b6d4a4c1SThomas Cort.Nm
47b6d4a4c1SThomas Cortutility displays a list of all users currently logged on, showing for
48b6d4a4c1SThomas Corteach user the login name, tty name, the date and time of login, and
49b6d4a4c1SThomas Corthostname if not local.
50b6d4a4c1SThomas Cort.Pp
51b6d4a4c1SThomas CortAvailable options:
52b6d4a4c1SThomas Cort.Pp
53b6d4a4c1SThomas Cort.Bl -tag -width file
54b6d4a4c1SThomas Cort.It Fl a
55b6d4a4c1SThomas CortSame as
56b6d4a4c1SThomas Cort.Fl -bdlprTtuv .
57b6d4a4c1SThomas Cort.It Fl b
58b6d4a4c1SThomas CortTime of last system boot.
59b6d4a4c1SThomas Cort.It Fl d
60b6d4a4c1SThomas CortPrint dead processes.
61b6d4a4c1SThomas Cort.It Fl H
62b6d4a4c1SThomas CortWrite column headings above the regular output.
63b6d4a4c1SThomas Cort.It Fl l
64b6d4a4c1SThomas CortPrint system login processes.
65b6d4a4c1SThomas Cort.It Fl m
66b6d4a4c1SThomas CortOnly print information about the current terminal.
67b6d4a4c1SThomas CortThis is the
68b6d4a4c1SThomas Cort.Tn POSIX
69b6d4a4c1SThomas Cortway of saying
70b6d4a4c1SThomas Cort.Nm
71b6d4a4c1SThomas Cort.Ar am i .
72b6d4a4c1SThomas Cort.It Fl p
73b6d4a4c1SThomas CortPrint active processes spawned by
74b6d4a4c1SThomas Cort.Xr init 8 .
75b6d4a4c1SThomas Cort.It Fl q
76b6d4a4c1SThomas Cort.Dq Quick mode :
77b6d4a4c1SThomas CortList only the names and the number of users currently logged on.
78b6d4a4c1SThomas CortWhen this option is used, all other options are ignored.
79b6d4a4c1SThomas Cort.It Fl r
80b6d4a4c1SThomas CortPrint the current runlevel.
81b6d4a4c1SThomas CortSupported runlevels are:
82b6d4a4c1SThomas Cort.Bl -tag -width "s (SINGLE_USER)"
83b6d4a4c1SThomas Cort.It Dv d Pq Dv DEATH
84b6d4a4c1SThomas CortThe system has halted.
85b6d4a4c1SThomas Cort.It Dv s Pq Dv SINGLE_USER
86b6d4a4c1SThomas CortThe system is running in single user mode.
87b6d4a4c1SThomas Cort.It Dv r Pq Dv RUNCOM
88b6d4a4c1SThomas CortThe system is executing
89b6d4a4c1SThomas Cort.Pa /etc/rc .
90b6d4a4c1SThomas Cort.It Dv t Pq Dv READ_TTYS
91b6d4a4c1SThomas CortThe system is processing
92b6d4a4c1SThomas Cort.Pa /etc/ttys .
93b6d4a4c1SThomas Cort.It Dv m Pq Dv MULTI_USER
94b6d4a4c1SThomas CortThe system is running in multi-user mode.
95b6d4a4c1SThomas Cort.It Dv T Pq Dv CLEAN_TTYS
96b6d4a4c1SThomas CortThe system is in the process of stopping processes
97b6d4a4c1SThomas Cortassociated with terminal devices.
98b6d4a4c1SThomas Cort.It Dv c Pq Dv CATATONIA
99b6d4a4c1SThomas CortThe system is in the process of shutting down and will
100b6d4a4c1SThomas Cortnot create new processes.
101b6d4a4c1SThomas Cort.El
102b6d4a4c1SThomas Cort.It Fl s
103b6d4a4c1SThomas CortList only the name, line and time fields.
104b6d4a4c1SThomas CortThis is the default.
105b6d4a4c1SThomas Cort.It Fl T
106b6d4a4c1SThomas CortPrint a character after the user name indicating the state of the
107b6d4a4c1SThomas Cortterminal line:
108b6d4a4c1SThomas Cort.Sq +
109b6d4a4c1SThomas Cortif the terminal is writable;
110b6d4a4c1SThomas Cort.Sq -
111b6d4a4c1SThomas Cortif it is not;
112b6d4a4c1SThomas Cortand
113b6d4a4c1SThomas Cort.Sq \&?
114b6d4a4c1SThomas Cortif a bad line is encountered.
115b6d4a4c1SThomas Cort.It Fl t
116b6d4a4c1SThomas CortPrint last system clock change.
117b6d4a4c1SThomas Cort.It Fl u
118b6d4a4c1SThomas CortPrint the idle time for each user, and the associated process ID.
119b6d4a4c1SThomas Cort.It Fl v
120b6d4a4c1SThomas CortWhen printing of more information is requested with
121b6d4a4c1SThomas Cort.Fl u ,
122b6d4a4c1SThomas Cortthis switch can be used to also printed
123b6d4a4c1SThomas Cortprocess termination signals,
124b6d4a4c1SThomas Cortprocess exit status,
125b6d4a4c1SThomas Cortsession id for windowing
126b6d4a4c1SThomas Cortand the type of the entry, see documentation of ut_type in
127b6d4a4c1SThomas Cort.Xr getutxent 3 .
128b6d4a4c1SThomas Cort.It Ar \&am I
129b6d4a4c1SThomas CortReturns the invoker's real user name.
130b6d4a4c1SThomas Cort.It Ar file
131b6d4a4c1SThomas CortBy default,
132b6d4a4c1SThomas Cort.Nm
133b6d4a4c1SThomas Cortgathers information from the file
134b6d4a4c1SThomas Cort.Pa /var/run/utmpx .
135b6d4a4c1SThomas CortAn alternative
136b6d4a4c1SThomas Cort.Ar file
137b6d4a4c1SThomas Cortmay be specified which is usually
138b6d4a4c1SThomas Cort.Pa /var/log/wtmpx
139b6d4a4c1SThomas Cort(or
140b6d4a4c1SThomas Cort.Pa /var/log/wtmp ,
141b6d4a4c1SThomas Cortor
142b6d4a4c1SThomas Cort.Pa /var/log/wtmpx.[0-6]
143b6d4a4c1SThomas Cortor
144b6d4a4c1SThomas Cort.Pa /var/log/wtmp.[0-6]
145b6d4a4c1SThomas Cortdepending on site policy as
146b6d4a4c1SThomas Cort.Pa wtmpx
147b6d4a4c1SThomas Cortcan grow quite large and daily versions may or may not
148b6d4a4c1SThomas Cortbe kept around after compression by
149b6d4a4c1SThomas Cort.Xr ac 8 ) .
150b6d4a4c1SThomas CortThe
151b6d4a4c1SThomas Cort.Pa wtmpx
152b6d4a4c1SThomas Cortand
153b6d4a4c1SThomas Cort.Pa wtmp
154b6d4a4c1SThomas Cortfile contains a record of every login, logout,
155b6d4a4c1SThomas Cortcrash, shutdown and date change
156b6d4a4c1SThomas Cortsince
157b6d4a4c1SThomas Cort.Pa wtmpx
158b6d4a4c1SThomas Cortand
159b6d4a4c1SThomas Cort.Pa wtmp
160b6d4a4c1SThomas Cortwere last truncated or
161b6d4a4c1SThomas Cortcreated.
162b6d4a4c1SThomas Cort.El
163b6d4a4c1SThomas Cort.Pp
164b6d4a4c1SThomas CortIf
165b6d4a4c1SThomas Cort.Pa /var/log/wtmpx
166b6d4a4c1SThomas Cortor
167b6d4a4c1SThomas Cort.Pa /var/log/wtmp
168b6d4a4c1SThomas Cortare being used as the file, the user name may be empty
169b6d4a4c1SThomas Cortor one of the special characters '|', '}' and '~'.
170b6d4a4c1SThomas CortLogouts produce an output line without any user name.
171b6d4a4c1SThomas CortFor more information on the
172b6d4a4c1SThomas Cortspecial characters, see
173b6d4a4c1SThomas Cort.Xr utmp 5 .
174b6d4a4c1SThomas Cort.Sh FILES
175b6d4a4c1SThomas Cort.Bl -tag -width /var/log/wtmp.[0-6] -compact
176b6d4a4c1SThomas Cort.It Pa /var/run/utmp
177b6d4a4c1SThomas Cort.It Pa /var/run/utmpx
178b6d4a4c1SThomas Cort.It Pa /var/log/wtmp
179b6d4a4c1SThomas Cort.It Pa /var/log/wtmp.[0-6]
180b6d4a4c1SThomas Cort.It Pa /var/log/wtmpx
181b6d4a4c1SThomas Cort.It Pa /var/log/wtmpx.[0-6]
182b6d4a4c1SThomas Cort.El
183b6d4a4c1SThomas Cort.Sh SEE ALSO
184b6d4a4c1SThomas Cort.Xr last 1 ,
185b6d4a4c1SThomas Cort.Xr mesg 1 ,
186b6d4a4c1SThomas Cort.Xr users 1 ,
187b6d4a4c1SThomas Cort.Xr getuid 2 ,
188b6d4a4c1SThomas Cort.Xr utmp 5 ,
189b6d4a4c1SThomas Cort.Xr utmpx 5
190b6d4a4c1SThomas Cort.Sh STANDARDS
191b6d4a4c1SThomas CortThe
192b6d4a4c1SThomas Cort.Nm
193b6d4a4c1SThomas Cortutility is expected to conform to
194b6d4a4c1SThomas Cort.St -p1003.2-92 .
195b6d4a4c1SThomas Cort.Sh HISTORY
196b6d4a4c1SThomas CortA
197b6d4a4c1SThomas Cort.Nm
198b6d4a4c1SThomas Cortutility appeared in
199*0a6a1f1dSLionel Sambuc.At v1 :
200*0a6a1f1dSLionel Sambuc.Lk http://cm.bell-labs.com/cm/cs/who/dmr/pdfs/man14.pdf
201