What is the difference between service and systemctl?
service is an "high-level" command used for starting and stopping services in different unixes and linuxes. Depending on the "lower-level" service manager,
service redirects on different binaries.
For example, on CentOS 7 it redirects to
systemctl, while on CentOS 6 it directly calls the relative
/etc/init.d script. On the other hand, in older Ubuntu releases it redirects to
service is adequate for basic service management, while directly calling
systemctl give greater control options.
systemctl is basically a more powerful version of
service you can only do commands related to the service (i.e.
restart) whereas with
systemctl you can use more advanced commands such as:
systemctl is-failed name.service # check if service failed to load
Or masking services:
systemctl mask name.service
There's a lot of good info on this page from Ask Ubuntu.
systemctl is the main utility to control daemons/services in
service command is the traditional utility in
One of systemd's features is to be compatible with SysVinit/legacy commands,
so, if you have the
service foo start will be a wrapper around
systemctl start foo.
Same story for