How to check if a service is running or not in a Linux Machine

By | August 29, 2013

In this example’s  iam checking the servicename “iptables”

Method 1: Using the service name

Example:

#service iptables status

Output of the above command

#iptables(pid 3243) is running…

Method 2: Using init.d scripts from the /etc/init.d folder

Example:

#/etc/init.d/iptables status

Output of the above command

#iptables start/running, process 3231

Method3: Using status command

Example:

#status iptables

Output of the above command

#iptables start/running, process 1321

To check all the services state at a time

#service –status-all

 


Quantcast

Leave a Reply

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