Virtual Machines

Products

Virtual Machines

Documentation > Products > Virtual Machines > How to View the Time When the Server Was Last Restarted from the System

How to View the Time When the Server Was Last Restarted from the System

1. Use the Last reboot Command

The last command is used to display the most recent login record for a user. In the Linux system, there is a pseudo user called reboot, which automatically log into the system each time the system is rebooted. Therefore, by checking the login record of the reboot user through the last command, you can track the reboot record of the system. The information in parentheses indicates how long the system last ran and the corresponding time period.

2. Use the who -b Command

3. Use the uptime Command

The uptime command displays the current time of the system and also shows how long the system has been booted, so you can figure out when the system was last started.

Update Time:2019-08-28 21:38:32