Linux who command details how to use Linux who command

Source: Internet
Author: User
Tags cpu usage

The Linux who command is used to display which users are on the system, the displayed information includes the user ID, terminal used, connection from which side, online time, idle time, CPU usage, and action.

Permission: all users can use it.

Syntax

Who-[husfV] [user]

Parameter description:

  • -H: do not display title columns
  • -U: do not display user actions/work
  • -S: Display in short format
  • -F: do not display the user's online location
  • -V: displays the program version.

Instance

Displays the users currently logged on to the system.

# Who // displays the users currently logged on to the system

Root tty7 (: 0)

Root pts/0 (: 0.0)

Root pts/1 (192.168.1.17)

Root pts/2 (192.168.1.17)

Display title bar

# Who-H

NAME LINE TIME COMMENT

Root tty7 (: 0)

Root pts/0 (: 0.0)

Root pts/1 (192.168.1.17)

Root pts/2 (192.168.1.17)

Show user logon sources

# Who-l-H

NAME LINE TIME IDLE PID COMMENT

LOGIN tty4 852 id = 4

LOGIN tty5 855 id = 5

LOGIN tty2 862 id = 2

LOGIN tty3 864 id = 3

LOGIN tty6 867 id = 6

LOGIN tty1 1021 id = 1

Display Terminal Properties

# Who-T-H

NAME LINE TIME COMMENT

Root + tty7 (: 0)

Root + pts/0 (: 0.0)

Root-pts/1 (192.168.1.17)

Root-pts/2 (192.168.1.17)

Show only the current user

# Who-m-H

NAME LINE TIME COMMENT

Root pts/1 (192.168.1.17)

Show in simplified mode

# Who-q

Root

# Users = 4

Related Article

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.