How do I install chkconfig on Ubuntu?

Posted on Sep 14, 2022

Question

I am running Ubuntu 13.10, and I'm pretty new to Linux. I tried:

$ sudo apt-get install chkconfig

Package chkconfig is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'chkconfig' has no installation candidate

I manually downloaded the package and unzipped it. The resulting folder has a file called:

chkconfig.install

But how do I run this? I tried this, but it didn't work.

$ sudo chkconfig.install

Answer

The command chkconfig is no longer available in Ubuntu.The equivalent command to chkconfig is update-rc.d.This command nearly supports all the new versions of ubuntu.

The similar commands are

update-rc.d <service> defaults

update-rc.d <service> start 20 3 4 5

update-rc.d -f <service> remove