uptime command

shows uptime of system

Typical usage: diagnosing problems, information gathering, uptime measurement, troubleshooting

Introduction into uptime

The uptime command is a small utility on Linux that helps showing when the system was booted and how long it is running. Great for troubleshooting, system administration, and to learn more about the stability of a system.

Installation

When uptime is not installed by default, it can be added to the system using the relevant software package.

Package information for uptime

Operating systemPackage nameInstallation
AlmaLinuxprocps-ng
dnf install procps-ng
Arch Linuxprocps-ng
pacman -S procps-ng
Debianprocps
apt install procps
Fedoraprocps-ng
dnf install procps-ng
Red Hat Enterprise Linuxprocps-ng
dnf install procps-ng
Rocky Linuxprocps-ng
dnf install procps-ng
openSUSEprocps
zypper install procps
Ubuntuprocps
apt install procps

Your Linux distribution using a different package? Share your feedback.

Usage

Available options

Long optionShort optionDescription
--pretty-pPresent information in human-readable output
--since-sShow the date and time that system started

Missing an option in this overview? Share your feedback.

Examples using uptime

Show uptime in weeks, days, hours

uptime --pretty

Show when the system was booted in ISO 8601 format

uptime --since

Frequently Asked Questions

What is the uptime command and its purpose?

The uptime command is a command-line tool to show how long the system is running

Which package provides the uptime command?

The command uptime is provided by the procps or procps-ng package.

Relevant articles using the uptime command

The following articles include an example on how to use uptime and might be worth further exploring.

Related and similar commands

Linux has a lot of tools and commands available and sometimes you just need that little other tool. Here is a list of commands that are similar or related to uptime:

Related and similar commands to uptime
CommandCategorySummary
nstatnetworkNetwork statistics and counters