User management command: Add User useradd, Set User Password passwd, view current user who.

Source: Internet
Author: User

User management command: Add User useradd, Set User Password passwd, view current user who.

Add User in Linux: useradd User Name

Add password for username: passwd Username

View all users in the system: cat/etc/passwd | cut-f 1-d:

Note: | it is an MTS queue that transmits cat output to cut for processing. The following cut is used to extract the first column of each line separated.

You can use the who command to view which users are currently logged on. A single user can log on multiple times. For example, there are two root users. A root is in its local directory, and a root is

Log on remotely using secureCRT

Explanation of information displayed by who:

The first column is the login user name. The second column is the login terminal. The tty In the login terminal indicates local login, that is, the login on the real machine,

Pts indicates a remote terminal. If multiple remote terminals exist,/, 2, and so on will be added for the sake of difference, such as pts/0, pts/1, pts/2 ....

The last logon time is the IP address of the logon host.

The information displayed by w command is more detailed than that displayed by who command. He will make some simple statistics on system resources, such as how many login users there are, how long has Linux been running since the beginning.


 


 

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.