Debian - Run Levels (Old Info)

by Scott, Revised on June 10, 2011 (Linux)

Editing Run-levels in Debian Lenny

Anytime run-levels are edited, first remove the soft links within the /etc/rcN.d directories (all commands as root):

update-rc.d -f apache2 remove

update-rc.d -f mysql remove

Stop all run-levels:

update-rc.d -f apache2 remove
update-rc.d apache2 stop 91 0 1 2 3 4 5 6 .

update-rc.d -f mysql remove
update-rc.d mysql stop 19 0 1 2 3 4 5 6 .

Start all run-levels:

update-rc.d -f apache2 remove
update-rc.d apache2 start 91 0 1 2 3 4 5 6 .

update-rc.d -f mysql remove
update-rc.d mysql start 19 0 1 2 3 4 5 6 .

Reset defaults:

update-rc.d -f apache2 remove
update-rc.d apache2 defaults

update-rc.d -f mysql remove
update-rc.d mysql defaults

Freeze or unfreeze run levels:

freeze-rc.d
unfreeze-rc.d

Editing Run-levels in Debian Squeeze

Debian now uses dependency based boot sequence.

Add a service:

insserv daemon

Remove a service:

insserv -r daemon

Tags: Linux