Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
    
@RaduRădeanu thanks for link –  lion Jun 17 at 18:55

2 Answers 2

up vote 8 down vote accepted

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.
share|improve this answer
1  
The -p and -s options seem to be non-standard, they don't exist on my Debian 7.5 server. –  nyuszika7h Jun 17 at 21:23
    
@nyuszika7h we are not talking about debian. –  Avinash Raj Jun 18 at 0:26
    
@nyuszika7h You do realize this is the Ubuntu site, right? That said, I think it warrants at least a footnote mention. –  Blacklight Shining Jun 18 at 18:08
    
@BlacklightShining Yes. I had a friend test on his Xubuntu VM, and those options don't exist there. –  nyuszika7h Jun 20 at 18:20

You can use uptime if you just want to know it from a Terminal.
Or you could use a systemmonitor like conky to display it permanently on the desktop.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.