Sys V is the most traditional version of init systems
To find out if you are using the Sys V init implementation, if you have an /etc/inittab
file you are most likely running Sys V.
List services
$ service --status-all
Start a service
$ sudo service <service> start
Stop a service
$ sudo service <service> stop
Restart a service
$ sudo service <service> restart
These commands aren't specific to Sys V init systems, you can use these commands to manage Upstart services as well. Since Linux is trying to move away from the more traditional Sys V init scripts, there are still things in place to help that transition.
/etc/init.d
scripts are the old way of doing things. They come from the System V standard. However, those scripts are fired only in a particular sequence, so no real dependencies can be established. Therefore, Upstart has been developed with the intent to substitute all the /etc/init.d
scripts with upstart scripts (in /etc/init
)
List services
$ service --status-all
Start a service
$ /etc/init.d/<service> start
Stop a service
$ /etc/init.d/<service> stop
Restart a service
$ /etc/init.d/<service> restart