停用服務
發表於 : 2018-04-18 16:21:24
https://askubuntu.com/questions/698993/ ... -in-ubuntu
If you are not using systemd (Ubuntu 14.10 and earlier), then the short answer is:
The following command will give you a list of all services on your machine:
service --status-all
You should be able to find the names of the services you want to disable in there.
For more details, see enabling-and-disabling-services and for the very long answer see this post (as already mentioned by @muru).
For Ubuntu versions that use systemd (15.04 and later) use:
For more details, see this post on Digital Ocean and the man page for systemctl.
If you are not using systemd (Ubuntu 14.10 and earlier), then the short answer is:
代碼: 選擇全部
update-rc.d -f <service> remove
service --status-all
You should be able to find the names of the services you want to disable in there.
For more details, see enabling-and-disabling-services and for the very long answer see this post (as already mentioned by @muru).
For Ubuntu versions that use systemd (15.04 and later) use:
代碼: 選擇全部
systemctl disable <service>