I want to improve the boot time of my Ubuntu GNOME 16.04 by disabling plymouth services when booting up. I've found two answers on how to do it on various websites namely:
# systemctl disable plymouth-quit-wait.service # systemctl mask plymouth-quit-wait.service
I can't execute either of the above unless I know what they do.
If a service is
enabled, then there is a symlink somewhere in
to a unit file, most often somewhere in
Helpfully, when you
enablea service, the full paths of the created link and target will be printed to stdout.
Disabling the service deletes the symlink, so the unit file itself is not affected, but the service is not loaded at the next boot, when systemd reads
However, a disabled service can be loaded, and will be started if a service that depends on it is started;
disableonly configure auto-start behaviour for units, and the state is easily overridden.
A masked service is one whose unit file is a symlink to
/dev/null. This makes it "impossible" to load the service, even if it is required by another, enabled service.
maska service, a symlink is created from
/dev/null, leaving the original unit file elsewhere untouched. When you
unmaska service the symlink is deleted.
However, I have noticed that these commands are not always honoured.
When I try to mask most services, it fails:
Of course, I stopped the service first. @Anwar suggests masking is only possible for non-critical services.
Unmasking a masked service, unless I masked it myself, also fails (silently). I believe this is because there is no unit file for the service anywhere, except in the form of a symlink to
/dev/null, this time in
I'm not the only one having this problem
To actually unmask the masked service x11-common, I had to delete the symlink to
sudo apt-get install --reinstall x11-common && sudo systemctl daemon-reload. Now when I query it with
systemctl status x11-commonI see the service has a nice green circle and is loaded and active (exited) although it has no unit file.
For further reference this article on How to Use Systemctl may be of some use.