Linux Comm W
# Linux w Command
[ Linux Command Manual](#)
The Linux `w` command is used to display information about users currently logged into the system.
Executing this command shows which users are currently logged into the system and what programs they are running.
Executing `w` alone displays all users. You can also specify a username to display information for only that user.
### Syntax
w
**Parameter Description**:
* -f Turn on or off displaying where users logged in from.
* -h Do not display the header line.
* -l Use a long format (default).
* -s Use a short format. Do not display login time, terminal stage, or CPU time used by the program.
* -u Ignore the name of the program and the CPU time used by the program.
* -V Display version information.
### Examples
Display current user
# w // Display current user login information and executed commands19:50:14 up 9:27, 4 users, load average: 0.31, 0.26, 0.18 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root tty7 :0 Thu12 31:39m 10:10 0.60s gnome-session root pts/0 :0.0 17:09 2:18m 15.26s 0.15s bash root pts/1 192.168.1.17 18:51 1.00s 1.24s 0.14s -bash root pts/2 192.168.1.17 19:48 60.00s 0.05s 0.05s -bash
Do not display login location
w -f 19:53:59 up 9:31, 4 users, load average: 0.05, 0.16, 0.15 USER TTY LOGIN@ IDLE JCPU PCPU WHAT root tty7 Thu12 31:43m 10:10 0.60s gnome-session root pts/0 17:09 2:21m 15.26s 0.15s bash root pts/1 18:51 0.00s 1.04s 0.14s -bash root pts/2 19:48 4:45 0.05s 0.05s -bash
Display in short mode
w -s 19:54:37 up 9:31, 4 users, load average: 0.24, 0.19, 0.16 USER TTY FROM IDLE WHAT root tty7 :0 31:43m gnome-session root pts/0 :0.0 2:22m bash root pts/1 192.168.1.17 0.00s -bash root pts/2 192.168.1.17 5:23 -bash
Do not display header
w -h root tty7 :0 Thu12 31:44m 10:10 0.60s gnome-session root pts/0 :0.0 17:09 2:23m 15.26s 0.15s bash root pts/1 192.168.1.17 18:51 0.00s 1.05s 0.14s -bash root pts/2 192.168.1.17 19:48 5:54 0.05s 0.05s -bash
[ Linux Command Manual](#)
YouTip