w – show who is logged in and what they are doing

w shows who is logged in and what they’re doing. It combines information from who and uptime.
Synopsis
w [OPTIONS] [USER]
Examples
Basic output
$ w
14:30:00 up 7 days, 3:45, 2 users, load average: 0.15, 0.20, 0.18
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
greys pts/0 192.168.1.50 10:00 0.00s 0.10s 0.01s w
admin pts/1 192.168.1.51 13:45 2:30 0.05s 0.01s vim server.conf
Specific user
$ w greys
Short format (no header)
$ w -h
greys pts/0 192.168.1.50 10:00 0.00s 0.10s 0.01s w
Without “from” column
$ w -f
Output Columns
| Column | Description |
|---|---|
| USER | Username |
| TTY | Terminal |
| FROM | Remote host (IP/hostname) |
| LOGIN@ | Login time |
| IDLE | Idle time |
| JCPU | CPU time for all processes on this TTY |
| PCPU | CPU time for current process |
| WHAT | Current command |
Header Line
14:30:00 up 7 days, 3:45, 2 users, load average: 0.15, 0.20, 0.18
│ │ │ │
│ │ │ └─ Load averages (1/5/15 min)
│ │ └─ Number of logged-in users
│ └─ System uptime
└─ Current time
Tips
- Quick check:
wis faster thanwho+uptimeseparately - Monitor users: Good for seeing what others are doing on shared systems
- Idle time: Shows who’s actually active vs just logged in
- Security: Check for unexpected users or sessions
See Also
Related Commands
- who — Show logged-in users
- users — Print logged-in user names
- last — Show login history
- uptime — System uptime and load






