commands
w — inspect login sessions and activity
Reports recorded login sessions and activity; availability and output depend on implementation, terminal and accounting records. -h suppresses heading. Do not share real host or session information. Example assumes a fresh account lab fixture; VM-only examples require explicit authorization.
Formal Syntax & Structure
linux syntaxlinux
w [OPTION] [USER]Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| -h | option | omit heading |
| USER | operand | optional account filter |
Return Value
exit status and output
Reports recorded login sessions and activity; availability and output depend on implementation, terminal and accounting records. -h suppresses heading. Do not share real host or session information.
Working Example
Example Snippetlinux
w -h