Home  >  Article  >  Operation and Maintenance  >  How to view login logs in Linux

How to view login logs in Linux

王林
王林forward
2020-08-01 17:23:515869browse

How to view login logs in Linux

Specific command:

(Recommended tutorial: linux tutorial)

last -f /var/log/wtmp

This log file permanently records every Events of user login and logout and system startup and shutdown. Therefore, as system uptime increases, the size of this file will increase, and the rate of increase depends on the number of user logins to the system.

This log file can be used to view the user's login record. The last command obtains this information by accessing this file and displays the user's login record in reverse order from back to front. Last can also be used to view the user's login record based on the user and terminal. tty or time to display the corresponding record.

(Video tutorial recommendation: linux video tutorial)

The result is as shown:

How to view login logs in Linux

The above is the detailed content of How to view login logs in Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete