Linux Uptime – How Long Has My Linux System Been Running?

linuxrebootuptime

Is there a command I can type in a terminal that will tell me the last time a machine was rebooted?

Best Answer

uptime

If you want it in numerical form, it's the first number in /proc/uptime (in seconds), so the time of the last reboot is

date -d "$(</proc/uptime awk '{print $1}') seconds ago"

The uptime includes the time spent in a low-power state (standby, suspension or hibernation).