centOS7 systemctl vs service

hello -

from what little i have figured out, centOS7 has moved to using "systemctl" to manage bootup services. i have learned such commands as:

systemctl status serviceName ;
systemctl start serviceName ;
also stop, enable, disable (and there are probably many more)

so, when i see instructions that call for something like this:

cd /etc/init.d/ ;
touch serviceName;
chmod 777 serviceName;
etc etc
service serviceName start ;
service serviceName stop ;
service serviceName restart ;

should i assume this is an obsolete way of handling startup services?
 

Quags

Administrator
Staff member
on centos it is

systemctl restart name.service

systemctl - just running this will show all the services available.

I've notice service name restart - can still work (it usually redirects to the actual systemctl command), if the file exists in /etc/init.d. Ubuntu seems to have made the system command redirect to all systemctl commands where centos/rhel only has a few like network.
 
Top