MAN page from OpenSuSE aaa_base-84.87+git20180409.04c9dae-lp22.214.171.124.i586.rpm
Section: Maintenance Commands (8)
Updated: Oct 2006Index
chkconfig - enable or disable system services
chkconfig is used to manipulate the runlevel links at boot time(seeinit.d
(7)).It can be thought of as a frontend toinsserv
(8).Chkconfig can run in six different modes: terse list mode, set mode,edit mode, list mode, add mode and delete mode. The last three modeswere added for compatiblity reasons.
TERSE LIST MODE
This mode lists the state of the specified services, or all knownservices if no service name was provided. Every printed lineconsists of the name of the service and the runlevels theservice is configured for at the moment. If it is configured inno runlevel,off
is used instead, if it is configured in the runlevels definedas a default by the start script,on
is used. If the service is an enabled inetd or xinetd service,inetd
are used. Inetd/xinetd services are configured in/etc/inetd.d
,respectively. You can use the -A
parameter to get all services (even the boot.*-services) listed.
If chkconfig is called without arguments, all services are listedin terse mode.
Set mode is used to configure at which runlevel a service shouldbe started. The arguments must be specified as pairs ofservice name and new state. You can useon
as special states to select the default set of runlevels or to disablea service completely. You can useinetd
to configure a service managed by the inetd/xinetd daemons.
Insserv can calculate dependencies for only one service at the sametime. To work around this limitation imposed by insserv, chkconfiguses the '-f' option of insserv when it reads the list of services fromstandard input. Note that --force switches off all dependency checksand could lead to depending services no longer working, use with care.
If no services are specified, chkconfig reads lines from standardinput. Each line must consist of a service/state pair. As this isexactly the output of the terse list mode, this can be used toreconfigure a service specification saved by a former run.
If the option-for--forceis also given, insserv is called with a '-f' option.
This mode is a combination of the terse list mode and set mode.It writes the state of all specified services (or all knownservices, if no service was provided) into a temporary file,starts an editor and re-configures all services to reflect thestates of the changed temporary file.
This mode can be used to check the state of a service.chkconfig exits with a return code of '0' if the service is enabledin all of the specified runlevels, otherwise the exit statusis '1'. If chkconfig is called with only a service name thecurrent runlevel of the system is used for checking.
List mode prints for each specified service a line that consistsof the service name and for runlevels zero to sixon
depending if the service will be started or not.on
will be printed in bright green if the output is written to aterminal. If the--deps
option is given, the names of the services that must be startedbefore this service is appended to each line. The inetd/xinetdservices are listed in extra sections.
You can use the-Aor--allservicesparameter to get all services (even the boot.*-services) listed.
Calls insservto enable a service and uses list mode to display the newsetting afterwards.
Same as add mode, but disable the service.
When no service names are given on the command line, chkconfigdefaults to all known services excluding thosethat are not enabled in runlevels 1 to 6 and start with 'boot.
option if you want to see such services as well.
list the runlevel configuration of all known services
- chkconfig apache
list the runlevel configuration of the apache web server
- chkconfig -t apache xntpd
list the runlevel configuration of the apache web server andthe network time protocol daemon.
- chkconfig apache on
configure the apache web server to be started on next boot time.
- chkconfig apache 5
configure the apache web server to be started only if thesystem reaches runlevel 5.
- chkconfig apache 35
configure the apache web server for runlevel 3 and 5.
- chkconfig apache on xntpd off
configure two services
- chkconfig finger xinetd
configure a xinetd service
- chkconfig -A >~root/chkconfig.save
backup the current configuration
- chkconfig -s <~root/chkconfig.save
restore the configuration
- chkconfig -e apache xntpd
change the runlevel configuration interactively
- chkconfig -e
change the runlevel configuration of all services interactively
- path to the boot script base directory as required by the LinuxStandard Base Specification (LSB).
- path to the inetd services. See the inetd manpage to find outhow to enable this feature.
- path to the xinetd services.
2003 SuSE Linux AG, Nuernberg, Germany.
Michael Schroeder <mlsAATTsuse.de>
- TERSE LIST MODE
- SET MODE
- EDIT MODE
- CHECK MODE
- LIST MODE
- ADD MODE
- DEL MODE
- OTHER OPTIONS
- SEE ALSO
This document was created byman2html,using the manual pages.