1W(1)                             User Commands                            W(1)
2
3
4

NAME

6       w - Show who is logged on and what they are doing.
7

SYNOPSIS

9       w [options] [user]
10

DESCRIPTION

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

COMMAND-LINE OPTIONS

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 -u.
36
37       -s, --short
38              Use  the short format.  Don't print the login time, JCPU or PCPU
39              times.
40
41       -f, --from
42              Toggle printing the from (remote hostname) field.   The  default
43              as  released  is  for the from field to not be printed, although
44              your system administrator or distribution  maintainer  may  have
45              compiled a version in which the from field is shown by default.
46
47       --help Display help text and exit.
48
49       -i, --ip-addr
50              Display IP address instead of hostname for from field.
51
52       -p, --pids
53              Display  pid  of  the  login  process/the  "what" process in the
54              "what" field.
55
56       -V, --version
57              Display version information.
58
59       -o, --old-style
60              Old style output.  Prints blank space for idle times  less  than
61              one minute.
62
63       user   Show information about the specified user only.
64

ENVIRONMENT

66       PROCPS_USERLEN
67              Override  the default width of the username column.  Defaults to
68              8.
69
70       PROCPS_FROMLEN
71              Override the default width of the from column.  Defaults to 16.
72

FILES

74       /var/run/utmp
75              information about who is currently logged on
76
77       /proc  process information
78

SEE ALSO

80       free(1), ps(1), top(1), uptime(1), utmp(5), who(1)
81

AUTHORS

83       w was re-written almost entirely by Charles Blake, based on the version
84       by Larry Greenfield ⟨greenfie@gauss.rutgers.edu⟩ and Michael K. Johnson
85       ⟨johnsonm@redhat.com⟩
86

REPORTING BUGS

88       Please send bug reports to ⟨procps@freelists.org⟩
89
90
91
92procps-ng                         2023-01-15                              W(1)
Impressum