是否有任何命令可以显示您的 ubuntu 使用了多少时间?

Moh*_*ani 5 command-line time

是否有任何命令可以告诉您,您打开 Ubuntu 多少次?例如,在早上 8 点打开 ubuntu,在早上 10 点编写该命令,结果是两个小时?

Avi*_*Raj 8

尝试下uptime命令,

$ uptime -s
2014-06-17 09:36:38
Run Code Online (Sandbox Code Playgroud)

或者

$ uptime -p
up 10 hours, 12 minutes
Run Code Online (Sandbox Code Playgroud)

uptime --help

-p, --pretty   show uptime in pretty format

-s, --since    system up since
Run Code Online (Sandbox Code Playgroud)

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.
Run Code Online (Sandbox Code Playgroud)