service

Updated: 2020-12-29

service is used to run an init script in /etc/init.d.

$ sudo service <your_service> {start, stop, restart, status}

For example,

$ sudo service docker start

will run the script /etc/init.d/docker and start dockerd. To check the status:

$ service docker status

To check status of all the services:

$ service --status-all
...
[ + ] cgroupfs-mount
[ - ] docker
[ ? ] networking
...

where [ + ] means the service is running, [ - ] is stopped, [ ? ] means status is not implemented.

systemctl is similar to service but more powerful