Sunday, June 15, 2008

CHKCONFIG on Ubuntu

Ubuntu has got it's own tools for telling the system which services to automatically start at the different run levels, none of them unfortunately is chkconfig which happens to be my favourite tool on Red Hat derivative distributions if you are like me and like using what you are used to by typing the following into your bash shell you can use chkconfig instead of the Ubuntu tools.

$ apt-get install libnewt0.52
$ ln -s /usr/lib/libnewt.so.0.52 /usr/lib/libnewt.so.0.50
$ wget http://www.tuxx-home.at/projects/chkconfig-for-debian/chkconfig_1.2.24d-1_i386.deb
$ dpkg --force-all -i chkconfig_1.2.24d-1_i386.deb

usage of chkconfig is as follows

chkconfig --level 0123456 program_name on
will turn on program_name so that it starts up on all runlevels, this is a bad example since you would seldom want an app or service to run on runlevel 0 (shutdown) or run level 6 (reboot)

chkconfig --list

will show you a comprehensive list of all services / programs and what run levels they will start on.

another easy to use tool for editing runlevels is sysv-rc-conf

to install
apt-get install sysv-rc-conf

and then just type sysv-rc-conf
gives a very easy to use interface for managing your runlevel symlinks

3 comments:

Crewze said...

When I tried to run dkpg on this downloaded file I got an error "not a debian format archive"

Any ideas?

This was on Ubuntu 8.1

CG said...
This comment has been removed by the author.
CG said...

Ubuntu now includes chkconfig in the repositories
so now you can simply apt-get install chkconfig