1W(1) User Commands W(1)
2
3
4
6 w - Show who is logged on and what they are doing.
7
9 w [options] user [...]
10
12 w displays information about the users currently on the machine, and
13 their processes. The header shows, in this order, the current time,
14 how long the system has been running, how many users are currently
15 logged on, and the system load averages for the past 1, 5, and 15 min‐
16 utes.
17
18 The following entries are displayed for each user: login name, the tty
19 name, the remote host, login time, idle time, JCPU, PCPU, and the com‐
20 mand line of their current process.
21
22 The JCPU time is the time used by all processes attached to the tty.
23 It does not include past background jobs, but does include currently
24 running background jobs.
25
26 The PCPU time is the time used by the current process, named in the
27 "what" field.
28
30 -h, --no-header
31 Don't print the header.
32
33 -u, --no-current
34 Ignores the username while figuring out the current process and
35 cpu times. To demonstrate this, do a "su" and do a "w" and a "w
36 -u".
37
38 -s, --short
39 Use the short format. Don't print the login time, JCPU or PCPU
40 times.
41
42 -f, --from
43 Toggle printing the from (remote hostname) field. The default
44 as released is for the from field to not be printed, although
45 your system administrator or distribution maintainer may have
46 compiled a version in which the from field is shown by default.
47
48 --help Display help text and exit.
49
50 -i, --ip-addr
51 Display IP address instead of hostname for from field.
52
53 -V, --version
54 Display version information.
55
56 -o, --old-style
57 Old style output. Prints blank space for idle times less than
58 one minute.
59
60 user Show information about the specified user only.
61
63 PROCPS_USERLEN
64 Override the default width of the username column. Defaults to
65 8.
66
67 PROCPS_FROMLEN
68 Override the default width of the from column. Defaults to 16.
69
71 /var/run/utmp
72 information about who is currently logged on
73
74 /proc process information
75
77 free(1), ps(1), top(1), uptime(1), utmp(5), who(1)
78
80 w was re-written almost entirely by Charles Blake, based on the version
81 by Larry Greenfield ⟨greenfie@gauss.rutgers.edu⟩ and Michael K. Johnson
82 ⟨johnsonm@redhat.com⟩
83
85 Please send bug reports to ⟨procps@freelists.org⟩
86
87
88
89procps-ng May 2012 W(1)