User Tools

Site Tools


boot:speed_up_boot

This is an old revision of the document!


Boot - Speed up boot

Check which services takes most time

Use the following command to check which service takes most of time

systemd-analyze blame

Disabling auto-start of services during boot

If you want to disable auto-starting of services during boot you can use the following command:

sudo systemctl disable some-time-eater-service.service --now

However, you might want to see which other services needs the service in question. To check use the following command

systemctl list-dependencies some-time-eater-service.service --reverse

Note: Replace some-time-eater-service.service with actual service name like postgresql@9.5-main.service.

Note that, disabling auto-start doesn't make a service non-startable. The service can be started after boot when requirement arises. If you want to completely disable it, read the next section


Disabling services completely.

If you want to completely disable a service so that it can't be started, you should use mask instead of disable. Like this

sudo systemctl mask <SERVICE-NAME>

Replace the <SERVICE-NAME> with actual name of a service

The difference between mask and disable is mask make a service completely disable, you can't start it. You must unmask to start it with systemd (you can still start with service). But disable simply disable auto-start of a service, you can start it later.

For example, After masking my postgresql@9.5-main.service service, when I wanted to start it with systemctl the following message is shown

Failed to start postgresql@9.5-main.service: Unit postgresql@9.5-main.service is masked.

boot/speed_up_boot.1574627267.txt.gz ยท Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki