centos没有service命令的恢复方法(-bash: service: command not found)

转载自:https://blog.csdn.net/u014175572/article/details/53375049?utm_source=itdadao&utm_medium=referral

 

centos系统中,如果/sbin目录下没有service这个命令,就会出现

-bash: service: command not found

的错误。

解决步骤如下:

1、输入:

# yum list | grep initscripts

会出现

 

initscripts.x86_64                         9.49.30-1.el7_2.3           updates

2、上面给出了可安装软件的yum源版本。

上面是目前系统已安装的initscripts情况,因为没有了service文件,显然已经出现了错误,然后执行

# yum install initscripts

posted @ 2018-08-13 00:34  风中追风_lonely  阅读(8894)  评论(0编辑  收藏  举报