How to show uptime and reboot history on your Mac the command line

Hexley_the_Platypus.svgUsually the top command shows you how long a Linux system is up and running – but sadly not on OS X, or Darwin more specifically.

There is however a command line tool with the descriptive name uptime which will tell you how long your Mac has been running, precisely the line that’s missing from top on OS X:

If you have the OS X Server App installed, it will show you this value in the GUI on the Overview screen too.

Reboot History

Sometimes it’s also nice to know when your Mac was last rebooted, especially if it’s a remote system you don’t often get to talk to. There’s another handy command which will show you just that: last reboot:

Further reading and kudos:

About Jay Versluis

Jay is a medical miracle known as a Super Survivor. He runs two YouTube channels, five websites and several podcast feeds. To see what else he's up to, and to support him on his mission to make the world a better place, check out his Patreon Campaign.

Add your voice!