Debian update-rc.d command not found

37,027

Solution 1

/usr/sbin/update-rc.d belongs to Debian package sysv-rc or file-rc, you should install one of them.

If you only know a file name and want to find out which package it belongs to, you can use the following command:

apt-file search file-name

To use it, you need to install package apt-file and update the local cache as instructed after you finished the installation.

Or you can search it online: Search the contents of packages.

Solution 2

update-rc.d can only be called by root, so try

sudo update-rc.d ...

or if you don't have sudo installed:

su root
update-rc.d ....

Solution 3

I also had a problem with

$ sudo update–rc.d apache2 defaults

the hyphen between update and rc.d was picked up by ctrl-c from a web page. The same command

$ sudo update-rc.d apache2 defaults

when typed in directly ran OK. I think the hyphen is a printer's special character, not a keyboard-typed hyphen.

Share:
37,027
fifamaniac04
Author by

fifamaniac04

Updated on March 20, 2020

Comments

  • fifamaniac04
    fifamaniac04 about 4 years

    I have seen some of the posts online where it says to navigate to the dir /usr/sbin/ and look for the file update-rc.d but I'm still running into the error that the bash: command not found.

    I'm trying to run: update-rc.d -f gdm3 defaults

    I've also tried: /usr/sbin/update-rc.d -f gdm3 defaults

    but that is still resulting in the same error.

    please advise... thanks