Jump to content

Starting, restarting, stopping service


Guest BooYah
 Share

Recommended Posts

Guest BooYah

Anytime I can avoid using a GUI I'm a happy man.

I'm sure lot of folks here already know this, but, with the exception of the cups daemon, I didn't till I found it in a postfix howto.

 

I sometimes need to use services that I don't start on boot-up, for example cups and jserver, which used to mean that I'd have to go the Mandrake Control Center and the services menu. Now, as root, I just use

 service <service name> start/stop/restart or reload/

 

The restart is good when my newtork fails to detect my ADSL connection on startup

 service network restart

 

You can also start the cups daemon, as root, by

cupsd

There's probably someother daemons you can start the sameway. Maybe someone else can list them?

 

Here's the shortcuts and some other options:

Usage: service -[Rfshv] SERVICE ARGUMENTS

       -f|--full-restart:      Do a fullrestart of the service.

       -R|--full-restart-all:  Do a fullrestart of all services currently runni                

ng.

       -s|--status-all:        Print a status of all services.

       -d|--debug:             Launch with debug.

       -h|--help:              This help.

       -v|--version:           Print version.

Link to comment
Share on other sites

A small addition according your tips:

After you install a package named 'bash-completion' you will be able to complete the name of the desired service with the TAB button like with a regular command in bash. This package allows much more completions then services - man and much more.

 

Hope this helps :)

 

Phazeman

Link to comment
Share on other sites

You can also use

/etc/init.d/<servicename> start|stop|restart|status

 

I think its identical to your service <servicename> except you don't need the bash command completion becuase its just expanding directories :D

 

erm, i know this is pedantic .... you did ask though.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...