Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

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
share|improve this question

marked as duplicate by hhlp, stephenmyall, belacqua, Marco Ceppi Nov 22 '12 at 21:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

which service do you wish to start/stop/restart? there is at least a way to do it in several services but I think you should be more specific on your needs. I don't think there is a way to start/stop/restart all the services at the same time. – Geppettvs D'Constanzo Aug 23 '11 at 19:21
for example if i wanted to stop nginx,I would do something like this $service nginx stop; I wanted to know if there are any other alternative ways to stop and start a service. Any GUI based application that displays or shows us the unused services etc. – user7044 Aug 23 '11 at 19:33
I edited my answer to include a GUI client called BUM. If you're interested in GUIs, you should edit your answer to take out "command." Generally when people are looking for a "command" they aren't interested in a GUI. – Kris Harper Aug 23 '11 at 20:53
You may find interesting the answers in this question…. – Geppettvs D'Constanzo Aug 23 '11 at 21:02
@AndreaCorbellini Answers there, including its accepted answer, also include information about how to start and stop services. Furthermore, the topics are naturally very closely related--anyone who wants to enable and disable services will probably want to know how to start and stop them as well, and most people who want to know how to start and stop them will likely also want to know how to enable and disable them. So I'm not sure. – Eliah Kagan Sep 11 '13 at 15:42
up vote 21 down vote accepted

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.

share|improve this answer
Boot-up Manager (bum) is very nice to have an easy report of services on our system. – Pisu Nov 15 '11 at 21:56
Why is the preferred method to use the binary in init.d/ and not the service manager service as part of the sysvinit-utils package? – ThorSummoner May 12 '15 at 20:24
@ThorSummoner it used to be but these days I think upstart is the prefered way. – vidstige Oct 21 '15 at 11:54

You can use the following commands:

service <servicename> stop

service <servicename> start

service <servicename> restart

Note service --status-all doesn't stop or start anything, it just returns a status (and there's some known bugs in it).

If you have upstart then you can use these:

stop <servicename>

start <servicename>

restart <servicename>
share|improve this answer
The latter (using upstart) is the preferred way in Ubuntu now. – Jason Apr 20 '15 at 19:55
Note that upstart is installed by default on Ubuntu since 6.10. – drevicko Jul 18 at 9:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.