Check Uptime on Ubuntu

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.

$ which uptime

$ uptime --version

Check system uptime

To check the system uptime, run the following command.

$ uptime

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.

$ uptime -p

$ uptime --pretty

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 -s

$ uptime --since

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.

$ uptime -h

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

$ man uptime

Bonus method

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

$ last reboot

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!



from Linux Hint https://ift.tt/3nzrIU8

Post a Comment

0 Comments