-   Linux - Software (
-   -   chkconfig for starting and stopping services (

fakie_flip 09-28-2012 02:21 AM

chkconfig for starting and stopping services
I'm using CentOS 6.1. From the chkconfig man page, it says

"The on and off flags cause the service to be started or stopped"

As a test, I did this, but it didn't stop. What's going on here?


[root@alpha conf]# chkconfig --level 3 atd off
[root@alpha conf]# service atd status
atd (pid  2734) is running...
[root@alpha conf]# runlevel
N 3
[root@alpha conf]#

I know I can use service atd stop to stop it, but I'm trying to study the chkconfig command.

bathory 09-28-2012 03:23 AM


chkconfig is used to specify what services are going to start/stop on spacific runlevels. From chkconfig manpage:

chkconfig - updates and queries runlevel information for system services


[root@alpha conf]# chkconfig --level 3 atd off
The command above makes atd not to start on boot at runlevel 3. It does not stop the service. To start/stop a service you use the service command as you've already mentioned.


All times are GMT -5. The time now is 03:06 PM.