How to determine boot time?

I am just curious to know the time taken by my system to boot. In Arch Linux there is something like systemd-analyze.

What is the alternative in Ubuntu?


Right after boot, run dmesg command. It shows you what you want.


Without installing any software, you can use uptime , a native linux command, which serves to show how long computer has been running. The uptime command executed right after you boot the system will give you a general idea. However, it will take you extra seconds to enter password and login. Better approach would be to set calling uptime > /opt/BOOT.txt as part of lightdm startup script. It will be executed once the login screen shows up.

To do that , open or create /etc/lightdm/lightdm.conf file with root permissions.

It should contain the following lines:

[SeatDefaults]
greeter-setup-script=uptime > /opt/BOOT.txt

After your next reboot there will be file /opt/BOOT.txt which will tell you how long system has been up.

Alternatively you could read /proc/uptime where the first entry is uptime in seconds


systemd-analyze is there on ubuntu.

You can only use that if you are using systemd as boot. dmesg -d would give you time taken for each command on boot process to execute..

You can always get systemd-analyze by using

sudo apt-get install systemd systemd-analyze