首先检查自己是否 使用的是root用户

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

bash: service: command not found

解决步骤如下:
1、 输入

yum list | grep initscripts

会出现:

initscripts.x86_64

解决CentOS下service 功能 不能使用 bash: service: command not found

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

yum install initscripts -y

解决CentOS下service 功能 不能使用 bash: service: command not found
 

3、 此时service命令就可用了

相关文章:

  • 2021-08-10
  • 2022-02-08
  • 2021-11-30
  • 2021-04-05
  • 2022-12-23
  • 2022-12-23
  • 2021-08-01
猜你喜欢
  • 2021-11-08
  • 2021-07-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案