What is an initscript service and how do I start and stop it?
Linux has several methods for running programs automatically, without direct input from the user. One of these methods is the SysV initscripts. Programs started by these initscripts are called initscript services or simply services. Every initscript service has a name associated with it. You can get a list of the services installed on a system using the chkconfig
command:
chkconfig --list
An initscript service can be setup to run, or not run, automatically when the system is booted:
chkconfigon
causes the service to start when the system is booted, and
chkconfigoff
causes the service to not be started when the system is booted. The chkconfig
command does not immediately start or stop a service, it only changes what happens to the service at the next reboot. To immediately start, stop, or check the current status of a service, use the service
command:
servicestart
servicestop
servicestatus
For more information on the chkconfig command, refer to the
chkconfig
man page. For more information on SYSV initscripts in general, refer to the documentation included in the initscripts
RPM.