linux无法使用service命令的解决方法

在linux上运行service https start,响应service command not found

后来google了一下,发现需要将/sbin目录加入环境变量PATH中。

可以在使用的用户目录的.bashrc文件中加入export PATH=$PATH:/sbin/

root用户在目录/root下

maminghao用户在目录/home/maminghao下

原文地址:https://www.cnblogs.com/google4y/p/2267399.html