How to view login logs in Linux

王林
Release: 2020-08-01 17:23:51
forward
6063 people have browsed it

How to view login logs in Linux

Specific command:

(Recommended tutorial: linux tutorial)

last -f /var/log/wtmp
Copy after login

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!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template