How to Find and Reduce Boot Time in Linux

How to Find and Reduce Boot Time in Linux


This post was last updated on August 1st, 2020 at 10:36 pm

When you power on a Linux system it initializes different services and runs different processes. The whole process can take some time that may vary from a few seconds to a few minutes. If the system takes unreasonably more time to boot then it is crucial to find out which process takes much time and fix it.

Ahead in this article, we will see how can we know the exact time taken in booting and how can you analyze it to optimize the system’s boot time.

How to Find boot time with systemd-analyze?

Systemd is a newer init system in Linux that includes various features like on-demand starting daemons, snapshot support, process tracking, and inhibitor locks, etc. It provides a number of utilities that can be used to manage a Linux operating system.

systemd-analyze is one of the systemd utilities command available in a Linux system that helps tracking down the process execution time.

Use the following command to see the details of services run at the last startup and it also displays the time taken by them –


As you can see in the image above my system takes approximately 46.335s to boot out of which the userland processes itself took 38 seconds.

Using systemd-analyze blame

You can use the following command to further breakdown this boot time into each unit by the process. Execute this command in the terminal –

systemd-analyze blame

Now, look at the output of this command –

The services are printed in decreasing order of the time taken while booting.

How to improve boot time in Linux?

The most important part of reducing the boot time is to find which process is taking more time. As discussed above after executing the systemd-analyze blame command you can find the services that are taking more than expected time. If a service is not necessary for the operating system you can disable it also. It will decrease the overall boot time of the system.

So, disabling the service which takes more time in the booting process will help to reduce the overall boot time of a Linux machine. From the above output – apt-daily-upgrade.service and NetworkManager-wait-online.service are two services that are taking the maximum time. In some multi-user environments, part of the boot-up process can come from the network.

For this case systemd defaults to waiting for the network to come on-line before certain steps are taken. It is possible that a user waits for an extremely long time for the network so the recommendation for this is to set the maximum wait time to 30s or a better way is to simply disable it. Disabling the Network Manager will not affect the core functionality of the operating system but if it is a different process then you need to assess it carefully before disabling. By using the following command you can disable a service in Linux –

sudo systemctl disable service-name
sudo systemctl disable NetworkManager-wait-online.service

And whenever you need you can enable it back again by using the following command –

sudo systemctl enable service-name
sudo systemctl enable NetworkManager-wait-online.service

Don’t disable any service that is necessary for the core functionality of the Linux operating system or until you don’t know about the consequences of it.

Well, that is all on reducing and optimizing the boot time on Linux. If you have a query or suggestion regarding this topic, you can write to us in the comments below.

Previous How to Configure Sudo to run Without Password or Password-less
Next What Is Git And How To Use It In Linux/Unix?

About author

You might also like

Linux Topics 2 Comments

How To Change Bootscreen Logo In Linux Mint?

This post was last updated on March 27th, 2021 at 07:25 pmContents1 Bootscreen2 Plymouth3 Steps to change the logo in Linux mint-4 Conclusion Bootscreen A bootscreen is a graphical representation

Linux Topics 0 Comments

How To Connect A Remote Linux Server Using SSH?

This post was last updated on August 2nd, 2020 at 08:28 pmSecure Shell(SSH) is a cryptographic networking protocol for securely getting access to a remote computer with the command line

Linux Topics 0 Comments

How to Find Exact Name of A Package by Using apt-cache in Linux?

This post was last updated on August 1st, 2020 at 10:53 pmIn a debian based package management system the apt-cache is a low-level tool to manipulate and obtain information about


No Comments Yet!

You can be first to comment this post!

Leave a Reply