Saturday, May 4, 2024
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 800  / 3 Years ago, thu, september 16, 2021, 4:56:30

is there any command which tells you, how much times you turn on your Ubuntu? For example in 8 AM you turn on ubuntu and at 10 AM you write that command and the result is two hours?


More From » command-line

 Answers
2

Give a try to uptime command,



$ uptime -s
2014-06-17 09:36:38


OR



$ uptime -p
up 10 hours, 12 minutes


From uptime --help



-p, --pretty   show uptime in pretty format

-s, --since system up since


From man uptime,



   uptime gives a one line display of the following information.  The cur‐
rent time, how long the system has been running, how many users are
currently logged on, and the system load averages for the past 1, 5,
and 15 minutes.

[#24585] Friday, September 17, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
pheter

Total Points: 223
Total Questions: 111
Total Answers: 119

Location: Guadeloupe
Member since Sat, Aug 22, 2020
4 Years ago
pheter questions
Mon, Jun 21, 21, 07:35, 3 Years ago
Tue, Jul 5, 22, 22:50, 2 Years ago
Sat, Nov 27, 21, 17:50, 2 Years ago
;