View login users in CentOS

Source: Internet
Author: User
Use the linux last command: The last Command lists the content of the wtmp file in the/var/log directory, which stores binary content, it cannot be opened directly using text boundary software such as vi. in this way, even the root user cannot modify the file content at will. the list includes the user name, terminal number, IP address, and logon time. the most important thing is the logon time and IP address.

Use the linux last command:

The last Command lists the content of the wtmp file in the/var/log Directory. this file stores binary content and cannot be opened directly using text boundary software such as vi. in this way, even the root user cannot modify the file content at will. the list includes the user name, terminal number, IP address, and logon time. the most important thing is the logon time and IP address, if you see an illegal IP address in this command or a login behavior at a time you have not performed, you are probably already logged on !!!

 

Last directly lists all the content of the file. you can use last | more or less to split the screen.

 

Last-d displays the IP address as the host name.

 

Last + user name to list all login behaviors of this user

 

Lastb lists the content of the btmp file in the/var/log directory.

 

 

The lastb command lists all user information that failed to log on. This file can be used to determine if someone is scanning your system !!

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.