In RedHat/CentOS distros, you start and stop services with /sbin/service
:
/sbin/service httpd reload
You set whether they should run on startup with /sbin/chkconfig
:
/sbin/chkconfig --levels 2345 on
What are the equivalents for a Debian-based distro like Ubuntu?
Best Answer
On Debian and Ubuntu you can run
/etc/init.d
scripts directly, as used to be true also on Red Hat / Centos, or useinvoke-rc.d
orservice
. I think theupstart
stuff is still evolving, so this may change.update-rc.d
is the tool corresponding tochkconfig
.But
insserv
is becoming the standard way to do this: