any advantage of "invoke-rc.d" over "service"??

Tom H tomh0665 at
Thu Jul 29 20:39:32 UTC 2010

On Thu, Jul 29, 2010 at 4:20 PM, Marius Gedminas <marius at> wrote:
> On Thu, Jul 29, 2010 at 02:27:30PM -0400, Robert P. J. Day wrote:
>>   i'm reading some new install instructions for a newly-released and
>> it suggests to use:
>>   $ sudo invoke-rc.d <service name>  ... etc etc ...
>>   normally, i'd use the "service" command instead, and i understand
>> that "invoke-rc.d" is used *during* the install process when, for some
>> reason i don't understand, "service" isn't fully available(?)
>>   are those two commands entirely equivalent?  is there any reason
>> that normal operation *should* use "service" over "invoke-rc.d"?  just
>> curious.

> invoke-rc.d is for maintainer scripts; service is for sysadmins.

>From the man page:

"invoke-rc.d is a generic interface  to  execute  System  V  style  init
script  /etc/init.d/name  actions, obeying runlevel constraints as well
as any local policies set by the system administrator.

"All access to the init scripts by Debian packages’  maintainer  scripts
should be done through invoke-rc.d."

There is no "not for sysadmins" notice but there is a "must be used by
maintainer scripts" one...

> invoke-rc.d will not start services if they're disabled for a particular
> runlevel. service will always start services.

Yes, it works hand-in-hand with update-rc.d and the /etc/rcX directories.

More information about the ubuntu-users mailing list