Linux View 7 commands for a user

Source: Internet
Author: User

In the Linux system, we will often use Linux to view the user's commands, here we have some of the commands summarized, a total of 7, and do a detailed explanation, in order to give you a more in-depth understanding, then let us look at these commands and specific applications.

One, Linux View user command w command

This command is used to show the user logged on to the system, and the W command is powerful, which not only shows who is logged on to the system, but also shows what the users are currently doing, and the statistics are more detailed and scientific than the WHO command.

The display items of the W command are arranged in the following order: The current time, the system boots to the present time, the number of logged-on users, the system's average load in the last 1 seconds, 5 seconds, and 15 seconds. Each user's data is then displayed in the following order: Login account, terminal name, remote hostname, logon time, idle time, JCPU, PCPU, and the command line that is currently running the process.

Where jcpu time refers to the time taken by all processes connected to the terminal (TTY). This time does not include past background job time, but it includes the time taken by the currently running background job. The pcpu time refers to the time taken by the current process (that is, the process shown in the what item). The specific usage and parameters of the command are described below.

Ii. Linux View user commands who commands

This command is used primarily to view the current user situation on the online. This command is very useful. If the user wants to establish instant messaging with other users, such as using the talk command, then the first thing to be sure is that the user is actually online, or the talk process cannot be built up. As another example, the system administrator wants to monitor what each logged-on user is doing at the moment, and also use the WHO command.

Login Name: login user name;

Terminal line: Using terminal equipment;

Login time: Log on to the system.

The common parameters of the WHO command are described below.

-M

Its effect with WHO am I shows the user name in the system, login terminal, logon time

-Q

Show only the number of user logins and logged-in users

-S

Ignored, it is the same as the WHO

-R

You can view the current operating level of the system

Run-level 3 APR 09:37 last=s

-h,--heading displays a column heading. The commonly used headings are shown in table 4-2.

Third, Linux View user command WhoAmI only display their own user name in the system

Iv. Linux Viewing user commands who am I

Display the user name in the system, login terminal, logon time

You can see the user name that you logged into the system, just like logname.

V. Linux View user commands logname

You can display the user name that you logged on to the system

Six, linux View user command last

You can see the last time you logged in, and of course root can see how other users are logged in.

Last-n user can see the first n times of user login

Vii. Linux View user command TTY

You can use TTY to report connected devices or terminals.

Linux View 7 commands for a user

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.