View users and user groups in CentOS

Source: Internet
Author: User

User group list file:/etc/group

See which users are in the system: cut-d:-F 1/ETC/PASSWD
View users who can log on to the system: CAT/ETC/PASSWD | Grep-v/sbin/nologin | Cut-d:-F 1
View user actions: W command (requires root permission)
View a User: W user name
View logged in User: Who
View User Login history: Last

List all currently logged in user commands: Who

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. The common syntax format for the WHO command is as follows: Who [IMQSUWHT] [--count] [--idle] [--heading] [--help] [--message] [--MESG] [--version] [--writable] [ File] [am I] all options are optional, which means that the WHO command can be used alone. When no option is used, the WHO command will display the following three items: Login name: Log in username; terminal line: Use terminal device; login time: Log on to the system. If two non-option parameters are given, then the WHO command will only display the user name, login terminal, and logon time of the WHO program. Usually these two parameters are "Am I", that is, the command format is: "Who am I". The common parameters of the WHO command are described below. -M, like the role of "Who Am I", displays the name of the user running the program. -q,--count only shows the number of login accounts and logged-in users of the user, which takes precedence over any other options. -S ignored. It is primarily intended for compatibility with other versions of the WHO command. -i,-u,--idle the last time the user has been working on the system since the logon time, which is often said to be "daze" time.

View users and user groups in CentOS

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.