During bootup, the system will execute scripts and updates and queries runlevel information for system services.
Each service which should be manageable by chkconfig.
These tools manage services that are started up by scripts in the /etc/rc.d/init.d directory.
This command in Linux that allows you to control what services start.
As root, type the following to get a list of all services chkconfig handles:
You see a list of services, use the –list option shows us a sampling of services managed by chkconfig.
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
akmods 0:off 1:off 2:on 3:on 4:on 5:on 6:off
You can use the on the option to have service started at specified runlevels, and the off option to disable it, see below.
chkconfig --level 5 httpd on
chkconfig --level 5 httpd off
The structure of command is :
chkconfig --levels <b>levels</b> <b>service</b> <b>switch</b>
–levels levels define the run levels in which you want the particular service switch to be turned.
service is the service we want enabled/disabled.
switch is on/off, meaning enabled/disabled.
If you want than reset with the reset option to restores a service.
chkconfig httpd reset
If you want a service removed entirely from the entire startup and shutdown process in all runlevels than use:
chkconfig --del httpd
You can also add services to chkconfig management than use this:
chkconfig --add httpd
Under Ubuntu we have this tool: sysv-rc-conf and the usage is practically identical to chkconfig.
By default, the utility is not installed on Ubuntu.