Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to get startup time and uptime for Linux system

2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report