For Ubuntu versions that use systemd (15.04 and later) use:
systemctl disable service
This will do the job. It will disable the service and won't restart after a reboot. To temporarily enable simply start the service. Not enable.
To find the service name use
service --status-all
Other commands are:
systemctl start service
- Use it to start a service. Does not persist after reboot
systemctl stop service
- Use it to stop a service. Does not persist after reboot
systemctl restart service
- Use it to restart a service
systemctl status service
- Shows the status of a service. Tells whether a service is currently running.
systemctl enable service
- Turns the service on, on the next reboot or on the next start event. It persists after reboot.
systemctl disable service
- Turns the service off on the next reboot or on the next stop event. It persists after reboot.