Home > Article > Operation and Maintenance > 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:
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!