Linux "w" Command Line Options and Examples
Show who is logged on and what they are doing.

w displays information about the users currently on the machine, and their processes. The header shows, in this order, the current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.


Usage:

w [options] user [...]






Command Line Options:

-h
Don't print the header.
w -h ...
-u
Ignores the username while figuring out the current process and cpu times. To demonstrate this, do a"su" and do a "w" and a "w -u".
w -u ...
-s
Use the short format. Don't print the login time, JCPU or PCPU times.
w -s ...
-f
Toggle printing the from (remote hostname) field. The default as released is for the from field to notbe printed, although your system administrator or distribution maintainer may have compiled a versionin which the from field is shown by default.
w -f ...
--help
Display help text and exit.
w --help ...
-i
Display IP address instead of hostname for from field.
w -i ...
-V
Display version information.
w -V ...
-o
Old style output. Prints blank space for idle times less than one minute.user Show information about the specified user only.ENVIRONMENTPROCPS_USERLENOverride the default width of the username column. Defaults to 8.PROCPS_FROMLENOverride the default width of the from column. Defaults to 16.FILES/var/run/utmpinformation about who is currently logged on/proc process information
w -o ...