grras
grras

CALL NOW FOR FREE CONSULTATION

+91 9983340133, +91 9001997175

grras

Benifits of systemctl command over service commands

Benifits of systemctl command over service commands:
It combines the functionality of both service and chkconfig into a single tool that you can use for instance to enable/disable services permanently or only for the current session.

How we can use systemctl command(start/stop , enable/disable services)
1.For start a service immediately:
systemctl start httpd
2.For stop a service immediately:
systemctl stop httpd
3.For restart a service:
systemctl restart httpd
4.Shows status of a service including whether it is running or not:
systemctl status httpd
5.Enables a service to be started on bootup(Same as chkconfig command)
systemctl enable httpd
6.Disables a service to not start during bootup:
systemctl disable httpd
7.Prevent a service from starting dynamically or even manually unless unmasked:
systemctl mask httpd
8.Check whether a service is already enabled or not:
systemctl is-enabled httpd

Now question arise in mind that service command or chkconfig command is working or not with systemd.
Yes. It has been modified to call systemctl automatically when dealing with systemd service files. So either of the following commands does the same thing

systemctl stop httpd

(or)

service httpd stop

Yes, for turning on/off services, compatibility has been provided both ways. chkconfig has been modified to call systemctl when dealing with systemd service files. Also systemctl automatically calls chkconfig when dealing with a traditional sysv init file.
So either of the following commands does the same thing

systemctl disable httpd
(or)
chkconfig httpd off

08 Easy Steps to Crack ROOT Password

If want to learn linux courses online then visit :- RHCSA Online Training | RHCE Online Training | RHCA Online Training | Linux Training in India

Leave a Reply

Your email address will not be published. Required fields are marked *