Service command in Ubuntu 8.10 (Intrepid) server

Sponsored Link
If you want to use service command in ubuntu intrepid install sysvinit-utils package.This package contains the important System-V-like utilities.Specifically, this package includes: killall5, last, lastb, mesg, pidof, service, sulogin.

If you have experience with Red Hat, Fedora, and CentOS servers you might be knowing about service command this is very useful command to start,stop and restart a service simple way.

Service Syntax

sudo service <service name> start/stop/restart

Service command Examples

For example if you want to restart apache server use the following command

sudo service apache2 restart

One more

sudo service named restart

If you want to show the status of all services on your ubuntu server use the following command

sudo service --status-all

This command is very useful for server administrators.

Sponsored Link

Incoming search terms:

Related posts

7 thoughts on “Service command in Ubuntu 8.10 (Intrepid) server

  1. AFAIK

    sudo /etc/init.d/ [start|stop|restart|status|???]

    does the same thing, and comes with tab-completion in case you forget the name of the service (or you’re too lazy to type it).

    [Reply]

  2. As Thomas has said /etc/init.d does the same thing…what is the point of using the service command, what benefits can it provide? Does it bypass the need for init.d scripts?

    [Reply]

  3. System->Administration->Services can set the state of services (i.e. whether or not to start them).

    There’s no GUI tool I know of to bounce them (other than Konsole :-)

    [Reply]

  4. The service commands make things simpler imo. The service command offers tab completion as well. It saves keystrokes compared to the ‘traditional’ way but thats just my 2 cents.

    [Reply]

Leave a comment

Your email address will not be published. Required fields are marked *