Red Hat/Debian/Gentoo Startup Commands

Since there are so many similarities and differences between Linux distributions, I put together this quick summary of the differences between the startup commands on a few of the popular distros (Red Hat, Debian/Ubuntu, and Gentoo):

The commands:

Red Hat: chkconfig
Debian: update-rc.d
Gentoo: rc-update

Start on bootup using the defaults:

chkconfig --add foobar
chkconfig foobar on

update-rc.d foobar defaults

rc-update add foobar default

Explicitly setting run levels (the 30/70 below are the sequence numbers):

chkconfig --level 2345 foobar on
chkconfig --level 016 foobar off

update-rc.d foobar start 30 2 3 4 5 . stop 70 0 1 6 .

Disabling/removing a service:

chkconfig foobar off
chkconfig --del foobar

update-rc.d foobar stop 20 2 3 4 5 .
update-rc.d -f foobar remove

rc-update del foobar

List current settings (no Debian version):

chkconfig --list foobar

rc-status --all


Leave a comment

Your email address will not be published. Required fields are marked *