I originally wrote this rough cheatsheet for documentation at work, where I had to deal with different linux flavours’ ways of configuring services / daemons.
These commands may be helpful when you are managing linux servers. Different versions of Ubuntu etc use different types of daemon/service managers.
Service configurations are located in
Enable a service on startup. There are two ways depending on OS.
chkconfig --add <service>
update-rc.d <service> default
You can then interact with the service using either
service, again depending on OS.
Sometimes both work, sometimes both work but show different services. Fun.
Stop a service:
initctl stop <service>
Logs can sometimes be found in
Simply put, service configurations are located in
Enable a service on startup:
systemctl enable <service>
Interact with a given service.
systemctl start|status|restart|stop <service>
service probably also works.
Logs can usually be access via
journalctl -u <service>