Sometimes you need to see how long the Linux system is running, when you need to know the last boot up time, and sometimes because of a power outage or a power failure, you need to see Linux boot time/restart time; Here's a summary of how to view the time of Linux opening
1:who Command View
Who-b View the last time the system started.
Who-r View current system run time
[Root@db-server ~]# Who-b
System Boot May 11 09:27
2:last reboot
The last reboot can see the time that Linux system history started as follows. After restarting the operating system, and then
[Root@db-server ~]# last reboot
Reboot system boot 2.6.9-42.ELSMP Thu May 29 15:25 (00:07)
Reboot system boot 2.6.9-42.ELSMP Sun May 11 09:27 (18+05:55)
Wtmp begins Mon May 5 16:18:57 2014
If you only need to see when the last Linux system started
[Root@db-server ~]# last Reboot | Head-1
Reboot system boot 2.6.9-42.ELSMP Thu May 29 15:25 (00:08)
3:top Command View
As shown in the screenshot below, the up indicates how long the system has been running for the time being. Which in turn calculates the system restart time
Back to the column page: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/