SysV
Link to originalSysV is the traditional way to start services in Linux was to place a script in
/etc/init.d, and then use theupdate-rc.dcommand (or in RedHat based distros,chkconfig) to enable or disable it.This command uses some mildly complicated logic to create symlinks in
/etc/rc#.d, that control the order of starting services. If you runls /etc/rc2.dyou can see the order that services will be killed with a file name likeK##xxxxand started with file namesS##xxxx. The##inS##xxxxmeans a “start order” for servicexxxx. Conversely, the##inK##xxxxmeans the kill order for servicexxxx.One major issue with SysV was that when booting the system, everything had to be done in serial, one thing after another, making system boot times really slow. Attempts were made to parallelize this, but they were haphazard and hard to take full advantage of. This was the main reason that Upstart was created.
Upstart
Link to originalUpstart uses job definition files in
/etc/initto define on what events a service should be started. So, while the system is booting, upstart processes various events, and then can start multiple services in parallel. This allows them to fully utilize the resources of the system, for instance, by starting a disk-bound service up while another CPU-bound service runs, or while the network is waiting for a dynamic IP address to be assigned.You can see all of the upstart job files by running
ls /etc/init/*.confLet me just stop here and say that if you don’t know what a service is, or what it does, DO NOT disable it!
Not all services have been converted to upstart. While working on the server team at Canonical for the past few months, I’ve worked on a number of converted job files, and the nicest part is that it allows one to get rid of all the script “magic” and just put in a few commands here and there to define exactly how to start the service, and nothing more. But for now, only a handful of traditional network services, like squid and samba, have been converted.
Systemd
Link to originalStarting with Ubuntu 15.04, Upstart will be deprecated in favor of Systemd.
In recent years, Linux distributions have increasingly transitioned from other init systems to Systemd. The Systemd suite of tools provides a fast and flexible init model for managing an entire machine from boot onwards.