Linux w command details how to use Linux w command

Source: Internet
Author: User

When you run this command, you can find out who are currently logged on to the system and the programs they are running.

If you run the w command separately, all users are displayed. You can also specify the user name to only display information about a user.

Syntax

W [-fhlsuV] [user name]

Parameter description:

  • -F. Enable or disable the function to show where the user logs on to the system.
  • -H: the title information column of each column is not displayed.
  • -L use the detailed format list, which is the default value.
  • -S uses a concise format list, which does not display the user logon time, CPU time consumed by terminal jobs and programs.
  • -U ignores the name of the execution program and the CPU time consumed by the program.
  • -V displays the version information.

Instance

Show current user

W // display the current user, not the logon location

19:50:14 up, 4 users, load average: 0.31, 0.26, 0.18

User tty from login @ IDLE JCPU PCPU WHAT

Root tty7: 0 Thu12 31: 39 m 10:10 0.60 s gnome-session

Root pts/0: 0.0 2: 18 m 15.26 s 0.15 s bash

Root pts/1 192.168.1.17 1.00 s 1.24 s 0.14 s-bash

Root pts/2 192.168.1.17 60.00 s 0.05 s 0.05 s-bash

Logon location not displayed

W-f

19:53:59 up, 4 users, load average: 0.05, 0.16, 0.15

User tty login @ IDLE JCPU PCPU WHAT

Root tty7 Thu12 31: 43 m 10:10 0.60 s gnome-session

Root pts/0 2: 21 m 15.26 s 0.15 s bash

Root pts/1 0.00 s 1.04 s 0.14 s-bash

Root pts/2 0.05 s 0.05 s-bash

Display in simplified mode

W-s

19:54:37 up, 4 users, load average: 0.24, 0.19, 0.16

USER TTY FROM IDLE WHAT

Root tty7: 0 31: 43 m gnome-session

Root pts/0: 0.0 2: 22 m bash

Root pts/1 192.168.1.17 0.00 s-bash

Root pts/2 192.168.1.17 5:23-bash

Do not show title

W-h

Root tty7: 0 Thu12 31: 44 m 0.60 s gnome-session

Root pts/0: 0.0 2: 23 m 15.26 s 0.15 s bash

Root pts/1 192.168.1.17 0.00 s 1.05 s 0.14 s-bash

Root pts/2 192.168.1.17 0.05 s 0.05 s-bash

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.