How to disable service in Ubuntu 18.04?
ubuntu services boot reboot service
Contrary to previous versions of Ubuntu which were using
service
command, the recommended way to manage
services is to used systemctl
command. This
command is available on many other distributions of Linux.
To disable running service on boot, the sub-command for this task
is disable
.
Disabling service
sudo systemctl disable <serviceName>
In case of issues with above command you can try also longer form:
sudo systemctl disable <serviceName>.service
For example to disable php7.2-fpm service, use:
sudo systemctl disable php7.2-fpm
Or in extended form:
sudo systemctl disable php7.2-fpm.service
See also how to list services to get name of service or how to enable service.