Page 94 - RHEL8 BOOK
P. 94

10. Maintain the same Process Id of http service
             [root@sun ~]# systemctl reload httpd.service

             11. Check whether a service is active (running)
             [root@sun ~]# systemctl is-active httpd

             12. Check whether a service is enabled or not
             [root@sun ~]# systemctl is-enabled httpd

             13. To check the if the service is failed state, run the command.
             [root@sun ~]# systemctl is-failed httpd

             14. To prohibit / restrict a service to be started manually or dynamically.
             [root@sun ~]# systemctl mask httpd

             15. To revoke mask of a service, run the command;
             [root@sun ~]# systemctl unmask httpd

             16. To check the list of all active state service running
             [root@sun ~]# systemctl list-units --type=service

             17. To check the list of total service running
             [root@sun ~]# systemctl list-units --type=service | wc –l

             18. To check the list of all active and inactive service running
             [root@sun ~]# systemctl list-units --type=service –all

             19. To check the list of a service running
             [root@sun ~]# systemctl list-units-files --type=service | grep httpd

             20. Start the http service
             [root@sun ~]# systemctl stop httpd

             21. Disable the http service
             [root@sun ~]# systemctl disable httpd

             22. To see the  service dependency tree
             [root@sun ~]# systemctl list-dependencies httpd.service









                                                       S. Pradhan
                             (MCA, MBA-IT, BCA, CCNA, MCSA 2012, RHCE, ETHICAL HACKING)
                                             Email Id:-spradhan.iiht@gmail.com
                                                           94
   89   90   91   92   93   94   95   96   97   98   99