Controlling Services

IDevice Icon Controlling Services

Regardless of how a service is enabled a runlevel or if it is defaulted to "On" or "Off", every service can be started or stopped and managed at runtime.

To see what services you have running run:

    # /sbin/service --status-all

 

To individually control a single service, use service. For example:

 
    # /sbin/service crond status

            crond (pid 1604) is running...

 
The status option can be replace with start, stop, status, reload, restart and sometimes other options also. For example:

 
            [root@charon ~]# service crond

 

Usage: /etc/init.d/crond {start|stop|status|reload|restart|condrestart}

            [root@charon ~]# service crond stop

                     Stopping crond:                                            [  OK  ]

           

            [root@charon ~]# service crond start

                    Starting crond:                                            [  OK  ]

           

            [root@charon ~]# service crond restart

                    Stopping crond:                                            [  OK  ]

                    Starting crond:                                            [  OK  ]

 

All services located in the directory: /etc/init.d/ can be controlled this way. An alternate form of control would be:

 
        # /etc/init.d/crond status

 

 

References : 

    http://www.mjmwired.net/resources/mjm-fedora-manage-services.html