What is the usage of the uptime command in Linux?
The uptime command in Linux displays the system’s running time and average load.
Its usage is as follows:
uptime [选项]
Common options include:
- – Display the system runtime in a user-friendly format.
- -s: Display the system’s boot time.
- -h: Show the system’s running time in an easy-to-read format, along with a simple help message.
- – V: Display the version information of the command.
By default, the uptime command will display the system’s uptime and average load in the following format:
15:25:07 up 1 day, 2:34, 2 users, load average: 0.00, 0.01, 0.05
At 15:25:07, the system shows the current time; “up 1 day, 2:34” indicates that the system has been running for 1 day, 2 hours, and 34 minutes; “2 users” means that there are currently 2 users logged in; and “load average: 0.00, 0.01, 0.05” displays the system’s average load over 1 minute, 5 minutes, and 15 minutes respectively.