Search code examples
linuxsystemctl

How to see if a service is running on Linux?


I'm using systemctl to setup and run my serviced on a Linux Redhat. How can I check if a service is in running state?

I can use

systemctl is-active <service name> 

to check if the service is is active or not. But I would like to check if the service is in the substate running.

enter image description here


Solution

  • systemctl status name.service

    check this out

    https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/sect-managing_services_with_systemd-services