w1
Display who is logged in and what they are doing
Usage
w [--libxo]
[-hin]
[user ...]
Overview
The w utility prints a summary of the current activity on the system, including what each user is doing. The first line displays the current time of day, how long the system has been running, the number of users logged into the system, and the load averages. The load average numbers give the number of jobs in the run queue averaged over 1, 5 and 15 minutes.
The fields output are the user's login name, the name of the terminal the user is on, the host from which the user is logged in, the time the user logged on, the time since the user last typed anything, and the name and arguments of the current process.
The following options are available:
-
--libxo -
Generate output via libxo(3) in a selection of different human and machine readable formats. See xo_options(7) for details on command line arguments.
-
-h -
Suppress the heading.
-
-i -
Output is sorted by idle time.
-
-n -
Do not attempt to resolve network addresses (normally
winterprets addresses and attempts to display them as names). When-nis specified more than once, hostnames stored in utmp are attempted to resolve to display them as network addresses.
If one or more user names are specified, the output is restricted to those users.
Compatibility
The -M, -N, -d, -f, -l, -s, and -w flags are no longer supported.
Releases
163 releases since Mac OS X 10.0; the text changed 8 times.
- 10.0–10.0.4
- 10.1–10.1.5
- 10.2–10.2.8
- 10.3–10.4.11
- 10.5–10.5.8
- 10.6–11.5
- 12.0.1–14.3
- 14.4–26.3
- 26.4–26.5
--libxo since macOS 14.4;
-n since macOS 14.4.
-M until Mac OS X 10.4.11.x86;
-N until Mac OS X 10.4.11.x86;
-d until Mac OS X 10.4.11.x86.