W(1)

๐Ÿ’– W(1) โ€” the "who's online & what are they even doing" page ๐Ÿ’–

okay bestie, this is w from the procps-ng manual set (section 1, general commands, iykyk). It's the little command that tells you who's on the machine rn and what they're up to. Let's get into it โœจ


๐ŸŒธ NAME ๐ŸŒธ

w โ€” Show who is logged on and what they are doing.

๐ŸŽ€ SYNOPSIS ๐ŸŽ€

w [option ...] [user]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

Okay so w spills the tea about the users currently on the machine, plus their processes. The header is giving main character energy and shows, in this exact order: the current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes. Periodt.

Then for each user you get these entries: login name, the tty name, the remote host, login time, idle time, JCPU, PCPU, and the command line of their current process. It's giving full profile, no crumbs ๐Ÿ’…

The JCPU time is the time used by all processes attached to the tty. It does not include past background jobs, but it does include currently running background jobs. The way that's such a specific little rule, obsessed.

The PCPU time is the time used by the current process, the one named in the "what" field.


โœจ OPTIONS โœจ

  • -c, --container โ€” show the container uptime instead of system uptime in the header. cute little container moment ๐Ÿซถ
  • -h, --no-header โ€” Don't print the header. bye header ๐Ÿ‘‹
  • -u, --no-current โ€” Ignores the username while figuring out the current process and cpu times. To demonstrate this, do a su and do a w and a w -u. go ahead, do the experiment, it's lowkey satisfying.
  • -s, --short โ€” Use the short format. Don't print the login time, JCPU or PCPU times. less is more fr fr.
  • -t, --terminal โ€” Usually w will use either the systemd sessions table or the utmp file to locate users. In terminal mode w will scan the terminal devices and locate user sessions this way. This is not a true count of users, for example a user with two xterms will show up twice, so the user count in the header will be different. Currently terminal devices scanned are /dev/tty* and /dev/pts/*.
  • -f, --from โ€” Toggle printing the from (remote hostname) field. The default as released is for the from field to not be printed, although your system administrator or distribution maintainer may have compiled a version in which the from field is shown by default. so like. it depends on your build, bestie ๐Ÿ™ˆ
  • --help โ€” Display help text and exit.
  • -i, --ip-addr โ€” Display IP address instead of hostname for from field. This option only works on non-systemd platforms as libsystemd only provides the remote host. so on systemd it's just. not doing that. ๐Ÿ’€
  • -p, --pids โ€” Display pid of the login process/the "what" process in the "what" field. The login process is also called the session leader. slay, session leader is such a title.
  • -V, --version โ€” Display version information.
  • -o, --old-style โ€” Old style output. Prints blank space for idle times less than one minute. vintage aesthetic โœจ
  • user โ€” Show information about the specified user only. just the one, pls and thank u.

๐ŸŒˆ ENVIRONMENT ๐ŸŒˆ

  • PROCPS_CONTAINER โ€” If $PROCPS_CONTAINER is set, then w behaves as if the --container option has been given.
  • PROCPS_USERLEN โ€” Override the default width of the username column. Defaults to 8.
  • PROCPS_FROMLEN โ€” Override the default width of the from column. Defaults to 16.

๐ŸŒธ FILES ๐ŸŒธ

  • /var/run/utmp โ€” information about who is currently logged on, only for non-systemd hosts.
  • /proc โ€” process information
  • /dev/tty*, /dev/pts/* โ€” Terminal device files scanned with --terminal mode.

๐Ÿ’€ BUGS ๐Ÿ’€

not me exposing the flaws but okay, transparency is iconic:

  • When using --terminal option, w assumes processes with a parent PID of 0 or 1 are agetty(8) processes and will not display them. This is prone to both false positive and negative errors. ๐Ÿ˜ญ
  • Idle time for users on certain sessions, such as X/Wayland sessions, will be incorrect. The --terminal option will show the correct idle times for terminal sessions on X/Wayland.
  • On platforms using systemd(1) the --ip-addr option will be ignored and the from column will report the remote host as either a hostname or IP address. yeah. it just does that.

๐Ÿ“ฎ REPORTING BUGS ๐Ÿ“ฎ

Please send bug reports to procps@freelists.org. they're literally waiting for your email bestie, don't be shy ๐Ÿ’Œ


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

free(1), loginctl(1), ps(1), systemd(1), top(1), uptime(1), who(1), utmp(5), agetty(8)


and that's the whole vibe!! this page is from procps-ng, dated 2025-11-29 โ€” so you know it's fresh, no cap. go forth and w responsibly, bestie ๐Ÿ’–โœจ๐ŸŽ€๐Ÿฆ‹๐ŸŒธ๐Ÿ’…๐Ÿซถ๐Ÿ‘‘

๐Ÿ“ฆ where this page comes from
  • arch rolling: procps-ng 4.0.7-1 ยท GPL AND LGPL
  • nixpkgs unstable: procps 4.0.7
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms