46

I can not use chkconfig tools in Ubuntu 12.10

It's a very useful tools to configure the service to autostart or not. Why is it no longer available?

7 Answers 7

60

sysv-rc-conf is an alternate option for Ubuntu.

The usage is almost the same.

To install:

sudo apt-get install sysv-rc-conf

To configure apache2 to start on boot

sysv-rc-conf apache2 on

equivalent chkconfig command

chkconfig apache2 enable

To check runlevels apache2 is configured to start on

sysv-rc-conf --list apache2

equivalent chkconfig command

chkconfig --list apache2
5
  • adding ... create an alias with the name chkconfig for sysv-rc-conf
    – Batakj
    Apr 23, 2014 at 9:46
  • For all who are puzzled about Upstart: There is no way to enable/disable Upstart type services in a common or automated fashion. According to docs: Upstart: If no config is available in /etc/default, edit config in /etc/init which reads to me like "improving a bad situation means for us making it unbearable". Hence no wonder package maintainers with a healthy mind stay with RC type initscripts.
    – Tino
    May 12, 2014 at 19:32
  • @Tino, package managers' decision to refrain from providing Upstart configs is an entirely different debate from the issue the OP's question poses. While it does deserve a forum and due discussion, I don't feel that comment is really warranted here.
    – dexterous
    Mar 21, 2016 at 19:15
  • To note: just running sysv-rc-conf with no options yields a comfortable interface to manage it. Dec 15, 2016 at 0:38
  • Unfortunately, sysv-rc-conf is not available for Ubuntu and I got "E: Unable to locate package sysv-rc-conf" when I used apt-get install sysv-rc-conf.
    – Shrm
    Oct 23, 2022 at 12:48
9

The Upstart equivalent of chkconfig is the update-rc.d. There's some info on how to use it in the UbuntuBootupHowto linked in L. D. James's answer.

Admittedly, this tool is anything but friendly; it tends to expose the ugly underbelly of SysV init with all it's gory runlevel and priority blackmagic. I have almost never managed to get it to do what I want in the first go. chkconfig did a fantastic job of abstracting all those numbers away and providing a simple, usable interface that was loved by all. Nevertheless, it was always lipstick on a pig.

It's a brave new world and I would suggest you put in some time towards learning how Upstart works so that you can wire new jobs using that. For existing packages/applications that still provide you with SysV init scripts, update-rc.d should allow you to do everything that chkconfig did, except for one usecase. update-rc.d provides no clean way to see what the current status of a given service is, i.e., there is no equivalent of chkconfig --list. For this particular case, I'd suggest ls -l /etc/rc*.d/*${service_name}.

HTH

Update: 12-June-2013 The answer at https://askubuntu.com/a/161893/111294 points to a more palatable alternative- sysv-rc-conf.

Update: 28-July-2013 Hmm... it appears that the OP has already answered here (https://askubuntu.com/a/277732/111294) suggesting sysv-rc-conf. Can't see how I missed that, have upvoted that answer now.

2
  • Upstart is to starting the service, I want the service do not start when I reboot my OS. Why the friendly tools is deprecated? and the unfriendly tools take it's place
    – 王子1986
    Feb 19, 2013 at 1:32
  • Like I said above, I agree that update-rc.d is an unfriendly tool and it is somewhat unfortunate that it has been discontinued on Ubuntu. That said, it was always a RHEL family tool that had been ported to Ubuntu. As for avoiding services from starting on booting into a particular runlevel, this can be achieved using Upstart as well. Just look at the 'start on runlevel' line in /etc/init/cron.conf .
    – dexterous
    Apr 4, 2013 at 4:22
2

chkconfig is a redhat-ism. In Ubuntu we use upstart instead of sysvinit as used by redhat.

2
1

on 13.10, none of the above 'solutions' work. Ran sysv-rc-conf, update-rc.d. Nada. sysv-rc-conf says bluetooth is off but it still runs. meh

Says it has been converted to upstart but nothing on how to disable the daemon, where the configuation for upstart is, etc, etc.

So, digging around, you can edit /etc/init/bluetooth.conf and just comment things out, presumably only the following is necessary (though I commented anything that looks relevant):

# exec /usr/sbin/bluetoothd

This will probably break with an upgrade but at least the bloody thing is off for a while.

0

As of 12.04, chkconfig could be installed using sudo apt-get install chkconfig.

I would recommend using Upstart.

Jobservice, along with jobs-admin is a GUI based tool for handling some upstart scripts if that is your preference. It can be installed from the software center or by running sudo apt-get install jobservice jobs-admin from a terminal.

If I recall, there did not appear to be an easy way to add new jobs from the GUI.

2
0

Else install chkconfig from Debian packages pool :

https://packages.debian.org/sid/chkconfig

0

Why is chkconfig no longer available in Ubuntu?

Well, there is some history behind. chkconfig is connected with UNIX System V or SysV (pronounced: "System Five").

Since then, Ubuntu switched to Upstart, and then again it switched to systemd.

systemd uses systemctl which reflects what was chkconfig to SysV.


From the man page :

systemctl may be used to introspect and control the state of the "systemd" system and service manager. Please refer to systemd(1) for an introduction into the basic concepts and functionality this tool manages.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .