LinuxCommandLibrary

w

TLDR

Show who is logged in and what they're doing

$ w
copy
Show without header
$ w -h
copy
Show for specific user
$ w [username]
copy
Short format (no login time, JCPU, PCPU)
$ w -s
copy
Show IP addresses instead of hostnames
$ w -i
copy

SYNOPSIS

w [-hisf] [user]

DESCRIPTION

w displays information about currently logged-in users and their processes. The first line shows current time, system uptime, number of users, and load averages (same as uptime output).
Each subsequent line shows one logged-in user with their terminal, login time, idle time, CPU usage, and current activity. This gives a quick overview of system usage and user activity.
The "WHAT" column shows the current foreground process for each user, useful for seeing what people are running.
Idle time shows how long since the user's last terminal activity—useful for identifying inactive sessions.

PARAMETERS

-h, --no-header

Don't print the header line
-s, --short
Short format; don't print login time, JCPU, or PCPU
-f, --from
Toggle printing the FROM (remote host) field
-i, --ip-addr
Display IP addresses instead of hostnames
-o, --old-style
Old style output (space-separated)
-u, --no-current
Ignore username while calculating current process times

OUTPUT COLUMNS

USER: Username
TTY: Terminal name
FROM: Remote host (or - for local)
LOGIN@: Login time
IDLE: Idle time
JCPU: Time used by all processes attached to tty
PCPU: Time used by current process
WHAT: Current process command line

CAVEATS

The FROM field may be blank or show "-" for local logins or when hostname resolution fails.
CPU time columns (JCPU, PCPU) may not accurately reflect all activity, especially for background processes or when using terminal multiplexers.
Some processes may not appear in WHAT if they detach from the terminal.

SEE ALSO

who(1), uptime(1), users(1), last(1), finger(1)

> TERMINAL_GEAR

Curated for the Linux community

GMKtec Gaming PC, K11 AMD Ryzen 9 8945HS, 32GB DDR5 RAM 1TB Mini PC Desktop Computer, Oculink, Dual NIC 2.5GbE LAN, HDMI/DisplayPort/USB4*2

GMKtec Gaming PC, K11 AMD Ryzen 9 8945HS, 32GB DDR5 RAM 1TB Mini PC Desktop Computer, Oculink, Dual NIC 2.5GbE LAN, HDMI/DisplayPort/USB4*2

$739.99
BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

$239.99
New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

$54.00
Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community

nuphy Air75 V2 Portable 75% Mechanical Keyboard,Wireless Keyboard

nuphy Air75 V2 Portable 75% Mechanical Keyboard,Wireless Keyboard

$129.95
BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

$239.99
Bmax Mini PC B2 Power Intel 5205U 8GB DDR4 256GB M.2 NVMe SSD ,HDMI 1.4&DP 1.2, USB3.2,4K Dual Display 2.4G/5G WiFi & BT5.0 Mini Desktop Computers /Office/Design

Bmax Mini PC B2 Power Intel 5205U 8GB DDR4 256GB M.2 NVMe SSD ,HDMI 1.4&DP 1.2, USB3.2,4K Dual Display 2.4G/5G WiFi & BT5.0 Mini Desktop Computers /Office/Design

$169.99