Linux Runlevel Tools
Runlevels are handled differently by each flavor of Linux.
RedHat
This applies to any RedHat-derived systems, like Fedora, Mandrake, CentOS, etc... These systems use the chkconfig utility, as follows:
chkconfig --list httpd- to see the runlevel statuses of the httpd servicechkconfig httpd on- turns onhttpdin runlevels 2-5chkconfig httpd off- turns offhttpdin runlevels 2-5chkconfig --add myservice- addsmyserviceto runlevel management systemchkconfig --del myservice- removesmyservicefrom s runlevel management system
Services handled by xinetd (like finger, telnet, rsync, ...) are enabled/disabled immediately by running an on/off command. Others require manual start/stop using the relevant script in /etc/init.d/*.
Debian
This applies to any Debian-derived system, like Ubuntu, Xandros, Gnoppix, etc... These systems use the update-rc.d utility, as follows:
update-rc.d apache2 defaults- turns onapache2in runlevels 2-5update-rc.d apache2 start 20 2 3 4 5 . stop 20 0 1 6 .- long-winded way of controlling it yourselfupdate-rc.d apache2 remove- turn offapache2for all runlevels
Gentoo
This applies to any Gentoo-derived system. These systems use the update-rc utility, as follows:
rc-update add myservice default- addsmyserviceto the default 2-5 runlevelsrc-update del myservice default- removesmyservicefrom the default 2-5 runlevelsrc-update -v showshows all init scripts and the runlevels they operate in (without the-v, only the active scripts will be shown.