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.
3I think you should include the exact version of ubuntu that you are using. New ubuntu versions use upstart, which has its own gotchas. – vtest – 2010-10-27T09:55:55.867
Edit:I am usning Xubuntu latest version 10.04, but id don't want to use and GUI for this, only from terminal. Looks like @prhq got something in his answer. What is upstart? – Aviv – 2010-10-27T13:30:14.423
Belongs elsewhere, either on Server Fault or Unix. Still useful though. – ripper234 – 2011-06-11T16:44:41.800