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 Linux last command

2025-01-18 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 Linux last command". The editor shows you the operation process through the actual case. The operation method is simple, fast and practical. I hope this article "how to use the Linux last command" can help you solve the problem.

The Linux common command last command is used to display the user's most recent login information.

Last lists current information related to users who logged in to the system in the past

Add that if you execute the last command alone, it will read the file of / var/log/wtmp and display all the users who log in to the system for the contents of the file to be recorded.

Syntax last (option) (parameter) option-a: display the host name or ip address from where to log in to the system on the last line;-d: convert the IP address to the host name;-f: specify the record file. -n or -: set the number of display columns on the list;-R: do not display the host name or IP address of the logged-in system;-x: display information such as system shutdown, restart, and change of execution level. Parameter user name: displays the user login list

Terminal: displays a list of logins from the specified terminal.

The instance last command is used to display the login status of the user. The following is a record that directly displays a fixed number of rows:

Last-10 root pts/0 221.6.45.34 Tue Dec 17 09:40 still logged in root pts/0 221.6.45.34 Mon Dec 16 09:00-11:57 (02:56) root pts/0 222.94.97.122 Sun Dec 15 20:39-23:28 (02:48) root pts/0 222.95.209.80 Sat Dec 14 14: 39-14:58 (00:18) root pts/0 221.6.45.34 Thu Dec 12 16:55-17:37 (00:41) root pts/0 49.65.139.195 Wed Dec 11 20:40-21:16 (00Wed Dec 35) root pts/0 49.65.139.195 Wed Dec 11 19 root pts/0 46-20 root pts/0 03 (00root pts/0 17) 221.6.45.34 Tue Dec 10 14:41-15:52 (01:10) root pts/0 221.6.45.34 Mon Dec 9 17:24-17:30 (00:06) root pts/0 221.6.45.34 Mon Dec 9 09:38-11 root pts/0 41 (02 Mon Dec 02) this is the end of the introduction to "how to use the Linux last command". 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