chkconfig command
LINUX-Frequently used commands
chkconfig command Control service registration, deletion, and service startup. |
Syntax |
chkconfig [Option] [Service-name] |
The chkconfig command is used to list the services that Linux starts when the system boots, and to register, delete, and start services on a run-level basis. The chkconfig command lists the services that Linux starts when the system boots, registers and deletes services, and finely controls the starting of services at each run level. In addition, super user (root) privileges are required to execute the chkconfig command. |
Frequently used options |
--list Lists services. --add Registers a service. --del Deletes a service. -h Display help for the chkconfig command. -v Displays the version of the chkconfig command. --level [runlevel] [service name] Sets the service on/off for each runlevel. |
Example: List the services. |
# chkconfig –-list ← Display the list of services NetworkManager 0:off 1:off 2:on 3:on 4:on 5:on 6:off abrt-ccpp 0:off 1:off 2:off 3:on 4:off 5:on 6:off abrt-oops 0:off 1:off 2:off 3:on 4:off 5:on 6:off |
Example: Register service |
# chkconfig --add proftpd |
Example: Delete the service |
# chkconfig --del proftpd |
Example: Set the service on/off for each run level. |
# chkconfig --level 2345 netfs off # chkconfig --level 2345 netfs on |