System administration

Linux uptime command

Show how long the system has been running and its load averages.

Availability: Common Linux commands; shell built-ins and external implementations may differ by distribution.中文

Syntax

uptime [OPTION]...

Examples

Show current time, uptime, users and load averages.

uptime

Show only a readable uptime duration.

uptime -p

Parameters, options and clauses

Option / clauseDescription
-p, --prettyShow uptime in a human-friendly format.
-s, --sinceShow the time the system started.
--helpDisplay help and exit (where supported).
--versionDisplay version and exit (where supported).
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory