Categories: LinuxUbuntu

How to Get Boot Time and Uptime on Ubuntu

As an Ubuntu system Administrator, you might want to know since when the system is running. This is especially helpful if you want to troubleshoot power or scheduling related problems. Although there are many open-source applications that you can install and use for this purpose, the Ubuntu ‘uptime’ command is the simplest to use and gives accurate results.

So how do we get the exact boot time and system uptime on Ubuntu? This article explains the usage of the uptime command to achieve this task.

We have run the commands on an Ubuntu 18.04 LTS system.

You can open the Terminal application either through the system Dash or the Ctrl+Alt+T shortcut.

Checking Uptime and Boot Time

Run the following command in order to view the time duration since your Ubuntu system is powered on and running(uptime):

$ uptime -p

The output displays the time, in hours and minutes and also if 2 or more users are logged in.

Run the following command in order to view the time at which your system was booted(boot time):

$ uptime -s

The output displays the date and time at which your system was booted.

Hope this article and the very simple uptime command helps you with all the troubleshooting related to your power and scheduling issues!

Karim Buzdar

About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. You can reach Karim on LinkedIn

Recent Posts

How to Install Magento 2 on AlmaLinux

Magento is a free and open-source e-commerce platform written in PHP. It is simple, easy…

1 year ago

How to Install ISPConfig Hosting Control Panel with Apache Web Server on Ubuntu 24.04

ISPConfig is an open-source control panel that allows users to manage multiple servers from a…

1 year ago

How to Test your Email Server (SMTP) Using the Telnet Command

As a Linux administrator, you may find it necessary to troubleshoot or test your Simple…

1 year ago

Managing Network Interfaces and Settings on Ubuntu 24.04 with nmcli

Ubuntu 24.04, like many modern Linux distributions, relies on the NetworkManager for managing network connections.…

2 years ago

Using Restic Backup on Ubuntu 24.04

Restic is a modern, open-source backup program designed for efficiency, security, and simplicity. It enables…

2 years ago

Installing phpMyAdmin on Rocky Linux 9 and Securing it with Let’s Encrypt SSL

phpMyAdmin is a popular free tool written in PHP intended to administer MySQL and MariaDB…

2 years ago