20 C
Thursday, January 21, 2021

Check Uptime on Ubuntu – Linux Hint

Must read

Any Linux distro comes with the uptime command. As the name suggests, this tool reports how long the system has been running. It’s an important command for system administrators to know. It helps troubleshooting issues related to power and scheduling. Of course, there are other alternative tools available for this purpose but uptime is relatively simple and easy-to-use.

In this guide, check out how to check uptime on Ubuntu.

Uptime on Ubuntu

On any UNIX-like system, the uptime command will come pre-installed. That applies to Ubuntu as well. Verify the existence of the tool by running these commands.

Check system uptime

To check the system uptime, run the following command.

The output is quite self-explanatory. The only confusing part would be the load average one. Here’s what it means (according to the uptime man page).

Human-readable output

For humans like us, wouldn’t a nicer output be appreciated? That’s what the “pretty” format does. Uptime offers the output in a human-readable format. Use the “-p” or “–pretty” flag.

Date and time since when the system is up

In some situations, the system may be up and running for days. If that’s the case, then we can tell uptime to report since when the system is running. Use the “-s” or “–since” flag.

Uptime help

The uptime tool doesn’t come with that much option. If you need help with uptime, it’s always a good idea to check out the help page.

For in-depth information, the man page is more appropriate.

Bonus method

This one isn’t related to the uptime command but it still offers information about the system reboot history.

Final thoughts

The uptime tool is quite simplistic. There’s not much to the tool. However, the information it provides helps a lot when troubleshooting.

Uptime isn’t the only tool Linux comes with. Interested in more fun stuff? Check out the 25 basic Linux commands that every Linux user should know.

Happy computing!

Source link

- Advertisement -

More articles


Please enter your comment!
Please enter your name here

Latest article