List Logged-in Users and Their Commands with w

The w command combines uptime and who with a per-user 'what are they running' column, perfect for shared servers.

LinuxusersmonitoringsessionsLow risk
Run `w` to list every logged-in user together with their login time, idle time, and the foreground command they are currently executing.

01Command

Command
$ w

02What it does

Many people know `who` but forget `w`, which is strictly more informative: the header repeats uptime and load averages, while each row shows USER, TTY, login time, IDLE, and the WHAT column with the current process. Use `w -h` to drop the header, or `w user` to filter to one account. It is ideal before rebooting a shared box to confirm nobody is mid-command.

03Risk

RiskLow risk

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • w(1) - show who is logged on and what they are doing
    Ubuntu Manpages · technical · 2026-09-17
    Evidence: w displays information about the users currently on the machine, and their processes; the header shows uptime and load, and the body lists each user's current JCPU/PCPU and WHAT command.

Last verified: 2026-09-17 · Category: System & Settings

06Related solutions