Get the App
SLTechnology News&Howtos  ›  Development  › 

How to get startup time and uptime for Linux system

Shulou Source: shulou.com Published: 2022-06-01 20:02:02 10月04日 Update

Editor to share with you how the Linux system to get startup time and uptime, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

We run commands on Ubuntu 18.04 LTS systems you can open terminal applications through the system Dash or Ctrl + Alt + T shortcuts.

Linuxidc@linuxidc:~/linuxidc.com$ uptime-h

Usage:

Uptime [options]

Options:

-p.-pretty show uptime in pretty format.

-h,-help displays this help and leaves

-s.-since system up since.

-V,-version shows the version of the program and leaves

For more details, see uptime (1).

Check uptime and startup time

Run the following command to view the duration since the Ubuntu system was up and running (uptime):

Linuxidc@linuxidc:~/linuxidc.com$ uptime-p

Up 5 hours, 20 minutes

The output shows the time, in hours and minutes, and whether 2 or more users are logged in.

Run the following command to view the system boot time (boot time):

Linuxidc@linuxidc:~/linuxidc.com$ uptime-s

2018-11-26 07:56:29

The output shows the date and time that the system booted.

There is another parameter-V (uppercase), which is used to query the version.

Linuxidc@linuxidc:~/linuxidc.com$ uptime-V

Uptime from procps-ng 3.3.12

These are all the contents of the article "how to get startup time and uptime in Linux system". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Time run system commands more articles content versions programs help output not much information units parameters can be passed uppercase most hours applications Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Shulou Information Shulou Technology Xiaomi macOS