Ubuntu – How to start and stop a service?

init.dservicesupstart

Possible Duplicate:
What’s the recommended way to enable / disable services?

Are there any other command to start stop restart service in ubuntu other than the below following.

  1. service --status-all
  2. service <service name> stop
  3. sudosysv-rc-conf

Best Answer

It depends largely on the service. The new and preferred way to stop start and restart services is through /etc/init.d. So, for example, to stop or start the Apache Webserver, you can run

/etc/init.d/apache2 stop

/etc/init.d/apache2 start

The same is true of many other services, but probably not all. You can use the utility sysv-rc-conf to see which services you have that use an init.d script and manage them that way as well. Run it with sudo sysv-rc-conf.

If you're looking for a GUI application, try Boot up Manager. Install with

apt-get install bum

and run from the UI or from a terminal with

sudo bum

Usage and documentation can be found here.

Related Question