Linux getting started Tutorial: how to check the last restart time of the Linux System

Source: Internet
Author: User

Linux getting started Tutorial: how to check the last restart time of the Linux System

Q: Is there a command to quickly check how long the system has been running? That is, how do I know the last restart time of the Linux system?

There are many ways to query the last restart time.

Method 1

The first method is to use the last command.

  1. $ Last reboot

This command actually shows the system running time in the last few days. Last was originally designed to display the logon history of a specific user. In Linux, a special "pseudo-user" called reboot will automatically log on to the system upon system restart. By checking the logon history of the reboot user, you can check the last restart time.

Method 2

Another method for detecting the last startup time of the system is to use the '-B' option with the who command.

  1. $ Who-B
Method 3

You can also use the uptime command to infer the last startup time of the system. The uptime command displays the current time and the system running time. From this information, you can calculate the last startup time of the system.

  1. $ Uptime

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.