View User Logon status in Linux

Source: Internet
Author: User

I,
W command
This command is used to display the users logged on to the system. W command is powerful. It not only shows who logged on to the system, but also shows the current work of these users, the statistical data is more detailed and scientific than the WHO command.

The display items of the W command are arranged in the following order: current time, system start time, number of logged-on users, average load of the system in the last 1 s, 5 S, and 15 s. The data of each user is displayed in the following order: Logon account, terminal name, remote host name, Logon Time, idle time, jcpu, pcpu, and command line of the currently running process.

The jcpu time refers to the time occupied by all processes connected to the terminal (TTY. This time does not include the previous background job time, but includes the time occupied by the currently running background job. The pcpu time refers to the time occupied by the current process (that is, the process displayed in what. The following describes the specific usage and parameters of the command.

II,
Who command
This command is used to view the current online users. This command is very useful. If you want to establish instant communication with other users, such as using the talk command, you must first make sure that the user is online. Otherwise, the talk process cannot be established. Another example is that the system administrator also needs to use the who command to monitor what every login user is doing at this moment.
13322696009
13652661679


Login Name: logon username;

Terminal line: Use a terminal device;

Login Time: the logon time to the system.

The following describes the common parameters of the WHO command.

-M
The same effect as Who am I shows the user name, logon terminal, and logon time in the system.

-Q
Only the user's Logon account and number of logged-on users are displayed.

-S
Ignore, which is equivalent to WHO

-R
You can view the running level of the current system
Run-Level 3 Apr 21 last = s


-H, -- heading displays the title of a row of columns. Common titles are shown in Table 4-2.

3,
Whoami only displays the user name in the system

IV,
Who am I displays the user name, logon terminal, and logon time in the system.
You can view the username you have logged on to the system, which is the same as LOGNAME.

V,
LOGNAME displays the username you have logged on to the system.

Sat,
Last can be used to view the last time you log on to the system. Of course, root can be used to view the logon status of other users.
The last-N user can view the previous n logins of the user.

Seven,
Tty
You can use tty to report connected devices or terminals.

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.