Table of Contents

Services - System and service managers

Linux provides many System and service managers.

A good init system should start only what is needed, and that on-demand. Either lazily or in parallel and in advance. However it should not start more than necessary, particularly not everything installed that could use that service.

init

System V style init script /etc/init.d/name.

Disadvantages of init

invoke-rc.d

invoke-rc.d is a wrapper around running the System V style init script /etc/init.d/name directly, obeying runlevel constraints as well as any local policies set by the system administrator.

The policy may cause the command not to be run at all, based on the current runlevel and whether the daemon should be run in that runlevel.

By default, Debian does not differentiate between runlevels 2-5, but as the local administrator, you can change what is run in each runlevel. invoke-rc.d will honor these local policies and not start a daemon if the runlevel is wrong.

According to the man page, all access to init scripts by Debian packages' maintainer scripts should be done through invoke-rc.d.

service

service runs a System V init script in as predictable an environment as possible, removing most environment variables and with current working directory set to /.

service works in most Linux distributions including Debian and Ubuntu.

systemd

systemd is the new system and service manager for Linux. It is a replacement for init system and can manage system startup and services. It starts up and supervises the entire system.

systemctl only works on systemd based Ubuntu like version 16.04 LTS and above.

Advantages of systemd

Disadvantages of systemd

References

System V

See init.

Upstart

Upstart jobs start as soon as they can.