How do I check if a service is running in Linux?



  • To check whether the httpd service is running:

    $ /sbin/service httpd status
    httpd (pid  2352) is running...
    

    To check the status of all services:
    [output is truncated]

    $ /sbin/service --status-all
    anacron is stopped
    atd (pid  2423) is running...
    auditd (pid  1944) is running...
    automount is stopped
    

Log in to reply
 

© Lightnetics 2024