Understanding the uptime Command

Basic Usage of uptime

The uptime command is used to display how long the system has been running, along with additional information such as the number of users currently logged in and the system load averages over the last 1, 5, and 15 minutes.

uptime [OPTION]...

Options Available with uptime

-p (Pretty)

Display the uptime in a more human-readable format:

uptime -p

-h (Help)

Display help information for the command:

uptime -h

--help

Display help information for the command:

uptime --help

--version

Display the version information of the command:

uptime --version

Examples of uptime Command

Display System Uptime

uptime

This command displays the current time, how long the system has been up, the number of users logged in, and the load averages for the last 1, 5, and 15 minutes.

Display Uptime in Human-readable Format

uptime -p

This command shows a more readable format of uptime, such as "up 1 hour, 20 minutes".

Understanding Uptime Output

The output of the uptime command typically includes the following information:

Summary of Options

Option Description
-p Display the uptime in a human-readable format.
-h Display help information for the command.
--help Display help information for the command.
--version Display the version information of the command.