w(1)
Display information about currently logged-in users and their activities.
Synopsis
w [OPTION]... [USER]...Description
The w command shows who is logged in and what they are doing. It displays a header line with current time, uptime, number of users, and system load averages, followed by a list of logged-in users with details about their terminal, login time, idle time, CPU usage, and current command.
Unlike who, which only shows login information, w displays the actual process each user is running, making it useful for system monitoring and identifying idle or resource-heavy sessions.
Common options
| Flag | What it does |
|---|---|
-h | Omit the header line (uptime, load average, number of users) |
-u | Ignore username while figuring out the current process and CPU times |
-s | Use short output format (omit login time, JCPU, PCPU) |
-f | Toggle printing the from (remote hostname) field |
-i | Print IP address instead of hostname for remote login |
-p | Show only processes matching a specific pattern |
-V | Display version information and exit |
Examples
Display all logged-in users with full details including current processes
wShow user list without the header (uptime and load averages)
w -hShow short format output with minimal columns (no login time or CPU usage)
w -sDisplay information only for user 'john'
w johnShow IP addresses instead of hostnames for remote connections
w -iIgnore username when determining process ownership and CPU times
w -u