Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 '14 at 18:55
up vote 8 down vote accepted

Give a try to uptime command,

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


$ 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
The -p and -s options seem to be non-standard, they don't exist on my Debian 7.5 server. – nyuszika7h Jun 17 '14 at 21:23
@nyuszika7h we are not talking about debian. – Avinash Raj Jun 18 '14 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 '14 at 18:08
@BlacklightShining Yes. I had a friend test on his Xubuntu VM, and those options don't exist there. – nyuszika7h Jun 20 '14 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


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.