uptime command
shows uptime of system
Typical usage: diagnosing problems, information gathering, uptime measurement, troubleshootingIntroduction 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 system | Package name | Installation |
---|---|---|
AlmaLinux | procps-ng |
|
Arch Linux | procps-ng |
|
Debian | procps |
|
Fedora | procps-ng |
|
Red Hat Enterprise Linux | procps-ng |
|
Rocky Linux | procps-ng |
|
openSUSE | procps |
|
Ubuntu | procps |
|
Your Linux distribution using a different package? Share your feedback.
Usage
Available options
Long option | Short option | Description |
---|---|---|
--pretty | -p | Present information in human-readable output |
--since | -s | Show 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:
Command | Category | Summary |
---|---|---|
nstat | network | Network statistics and counters |