Managing Red Hat's Runlevels
Unless you took the time to do a custom installation, Red Hat/Fedora typically starts all kinds of services when it boots. If you took the fast way, you probably have all sorts of services running that you'd like to shut off. Or you'd like to start different services on different runlevels, for testing and tinkering.
# chkconfig —level 2345 ssh on
# chkconfig —level 016 ssh off
You need both steps—define which runlevels the service will run on, and define which runlevels it will not run on. "Off" means kill, and "on" means start.
To add a new service to all levels, use:
# chkconfig —add ssh
To delete a service from all runlevels, use:
# chkconfig —del ssh
# chkconfig ktalk on
# chkconfig rsync off
xinetd services are either on or off; you don't have to worry about different runlevels.
To display the status of all services, on all runlevels, and xinetd services, use:
# chkconfig —list
anacron 0:off 1:off 2:on 3:on 4:on 5:on 6:off
syslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off
cups 0:off 1:off 2:on 3:on 4:on 5:on 6:off
apmd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
xinetd based services:
chargen-udp off
rsync: off
sgi-fam: on
To query a single service, use:
# chkconfig —list syslog
syslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off
0 Comments