美文网首页
centos解决bash: service: command n

centos解决bash: service: command n

作者: Way_Kwok_Chu | 来源:发表于2020-01-06 18:13 被阅读0次

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

bash: service: command not found
1
解决步骤如下:
1、 输入

yum list | grep initscripts
1
会出现:

initscripts.x86_64
1
(其实一共有三个信息,但是后面根据版本不同,显示的信息也不同)
2、 上面给出了可安装软件的yum源版本,然后执行

yum install initscripts -y
1
3、 此时service命令就可以使用了

相关文章

网友评论

      本文标题:centos解决bash: service: command n

      本文链接:https://www.haomeiwen.com/subject/tdghactx.html