System Info
w
Show who is logged in and what they are doing.
Synopsis
syntax
w [OPTION]... [USER]
Examples
Show all logged-in users and their activity
w
Show activity for specific user
w alice
Short format output
w -s
Common options
| Flag | Description |
|---|---|
| -h | Don't print the header |
| -s | Short format |
| -f | Toggle FROM (remote host) field |
About w
The `w` command show who is logged in and what they are doing. System information commands provide insight into hardware, kernel, memory, disk, and user session details.
These are typically the first tools you reach for when diagnosing system problems, capacity planning, or auditing a server's configuration. They work across most Linux distributions without additional packages.
The command accepts 3 commonly used flags shown above, though the full set of options is available in the man page (`man w`). The 3 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.
Related commands
More System Info Commands
Other commands in the System Info category