Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the lastlog command of Linux

2025-02-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the relevant knowledge of "how to use the lastlog command of Linux". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "how to use the lastlog command of Linux" can help you solve the problem.

The Linux common command lastlog command is used to display the last login information of all users in the system.

Lastlog displays the last login information of all users in the system

Add that the lastlog file is queried every time a user logs in. You can use the lastlog command to check when a particular user last logged in and format the contents of the last login log / var/log/lastlog output. It displays the login name, port number (tty), and last login time, sorted by UID. If a user has never logged in, lastlog displays * * Never logged**. Note that you need to run the command as root.

Syntax lastlog (option) option-b: display login information before the specified number of days;-h: display help information for the summoning order;-t: display login information since the specified number of days;-u: display the most recent login information for the specified user. Instance lastlog Username Port From Latest root pts/0 221.6.45.34 Tue Dec 17 09:40:48 + 0800 2013 bin * * Never logged in** daemon * * Never logged in** adm * * Never logged in** lp * Never logged in** sync * * Never logged in** shutdown * * Never logged in** halt * * Never logged In** mail * Never logged in** news * * Never logged in** uucp * * Never logged in** operator * * Never logged in** games * * Never logged in** gopher * Never logged in** ftp * * Never logged in** nobody * * Never logged in** vcsa * * Never logged in** ntp * Never logged in** sshd * * Never logged in** nscd * * Never logged in** ldap * * Never logged in * * postfix * Never logged in** www * * Never logged in** mysql * * Never logged in** 's content on "how to use the lastlog command of Linux" ends here. Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report