Linux/Unix systems keep the details of the system uptime. You may also need to know when the server is running. This tutorial we will use Linux uptime command.

Advertisement

What is Uptime?

The uptime is the amount of time a system is continuously running since the last start/restart.

Check System Uptime in Linux

You can use the uptime command to find the system uptime. Uptime command is available under procps package. This command also provides the current system time, number of logged in users and current CPU load.

uptime 
 
07:33:31 up 174 days,  5:12,  2 users,  load average: 0.17, 0.14, 0.17

as per the above output, the system is running from 174 days, 5 hours and 12 minutes.

Check Last Reboot in Linux

Additionally, you can also use the last command to find the system reboot history. This will help you to find when the system was last rebooted.

last reboot 

reboot   system boot  2.6.18-92.el5    Sat Feb 11 12:00         (12+22:51)
reboot   system boot  2.6.18-92.el5    Sun Feb  5 12:57         (5+21:17)
reboot   system boot  2.6.18-92.el5    Sat Jan 28 15:58         (13+18:16)
reboot   system boot  2.6.18-92.el5    Thu Jan 26 17:15         (15+17:00)
reboot   system boot  2.6.18-92.el5    Mon Jan  9 13:40         (32+20:35)
reboot   system boot  2.6.18-92.el5    Sun Jan  8 15:50         (33+18:24)
reboot   system boot  2.6.18-92.el5    Sat Dec 24 12:58         (48+21:17)

The above output shows that the system was last rebooted on Feb 11 at 12:00 PM and others as well.

Share.

3 Comments

Leave A Reply


Exit mobile version