The Linux Newbie Guide  ⇒    Fundamentals     Advanced     Supplement   Command Index   ENG⇒中
All rights reserved, please indicate the source when citing
  

w - Display User Information

The w command, which stands for "show who is logged on and what they are doing," provides information about users currently logged into the system and their activities. You can use it to see who is logged in, what processes they are running, and more. It can also be used to specifically check information for a particular user.

The syntax of the w command is as follows:
w [OPTIONS] .

In most cases, you don't need to specify any options.

Example:
$ w daisy
 03:51:14 up 52 min, 3 users, load average: 0.19, 0.09, 0.10
USER     TTY       FROM         LOGIN@    IDLE   JCPU   PCPU WHAT
daisy    tty2                   03:50    10.00s  0.09s  0.04s vim seq.cpp

The output includes the following information

The w command is useful for monitoring and understanding user activity and processes on a system, especially in multi-user environments. You can press the "q" key to exit the w command's output.

For more examples and explanations, you can refer to the provided link.