Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to run the command below on CentOS and of course I get command not found:

$ update-rc.d redis_6379 defaults

How do I then perform the equivalent using chkconfig?

share|improve this question
update-rc.d doesn't not exist on Red Hat distros such as Fedora/CentOS/etc. The equivalent would be to use chkconfig, eg. chkconfig redis_6379 on or chkconfig --level 345 redis_6379 on. – slm Nov 11 '14 at 3:10

It is important to understand what the command does in order to use the equivalent on a different system. Here is the description of "defaults" in the update-rc.d manpage:

   If  defaults is used then update-rc.d will make links to start the ser
   vice in runlevels 2345 and to stop the service in  runlevels  016.

In order to replicate this in chkconfig, two commands are needed:

chkconfig redis_6379 on

By default, chkconfig assumes levels 2345. Any runlevels not specified as on, will be marked as off. This will be levels 016.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.