Insserv : commande introuvable
Hello,
I hope you are doing well and in good health.
I have a problem when I run the command
Anyone have any ideas? What should I do to fix this issue?
Thank you in advance.
I hope you are doing well and in good health.
I have a problem when I run the command
insserv: it says Command not found even though it is installed.
Anyone have any ideas? What should I do to fix this issue?
Thank you in advance.
3 answers
-
Hi,
Maybe it's because you're not using that command which requires administrator rights with the correct privileges? So try running it with sudo. -
Thank you for your response... But I executed the command as root, and it displays that it is not found.
-
Hello,
Can you report the results of:
whoami echo $PATH whereis insserv
As a reminder, if you do not provide the absolute path to an executable (e.g./sbin/insserv
), your shell checks (in order) the directories listed in the environment variablePATH
and stops as soon as it finds one. If none of the directories in yourPATH
contains an executable with that name, your shell will return command not found.
In the particular case ofinsserv
, it is normally located in/sbin
. This directory is referenced in yourPATH
if you are logged in as root, but not as a user. This command requires administrative rights and must therefore be run as root.
Example :
(mando@silk) (~) $ su -
Password :
(root@silk) (~) # insserv --help
Usage: insserv [<options>] [init_script|init_directory]
Available options:
-h, --help This help.
-r, --remove Remove the listed scripts from all runlevels.
-f, --force Ignore if a required service is missed.
-v, --verbose Provide information on what is being done.
-q, --silent Do not print warnings, only fatal errors.
-i, --insserv-dir Place dependency files in a location other than /lib/insserv
-p <path>, --path <path> Path to replace /etc/init.d.
-o <path>, --override <path> Path to replace /etc/insserv/overrides.
-c <config>, --config <config> Path to config file.
-n, --dry-run Do not change the system, only talk about it.
-s, --show-all Output runlevel and sequence information.
-u <path>, --upstart-job <path> Path to replace existing upstart job path.
-e, --recursive Expand and enable all required services.
-d, --default Use default runlevels as defined in the script
Note : If you are on Ubuntu, to become root, usesudo su -
or enable the root account.
Good luck!