Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

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?

share|improve this question
up vote 4 down vote accepted

On Debian and Ubuntu you can run /etc/init.d scripts directly, as used to be true also on Red Hat / Centos, or use invoke-rc.d or service. I think the upstart stuff is still evolving, so this may change.

# /etc/init.d/httpd reload
# /usr/bin/service httpd reload
# /usr/sbin/invoke-rc.d httpd reload

update-rc.d is the tool corresponding to chkconfig.

# /usr/sbin/update-rc.d httpd start 20 2 3 4 5 . 80 0 1 6 .

But insserv is becoming the standard way to do this:

 # /sbin/insserv httpd,start=2,3,4,5 # 0,1,6 will be automatically set to off
share|improve this answer
You still can run init.d scripts directly in RedHat/Centos. – JeffG Mar 10 '11 at 3:13

Services can be started/stopped in Ubuntu with /usr/sbin/service serviceName start|stop. The syntax is the same as RH/Cent, but the path is different. Upstart isn't currently used in Debian, so use /etc/init.d/service serviceName start|stop instead.

/usr/sbin/update-rc.d is what I use to enable/disable services at startup. Check out the manpage for more details.

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.