![](https://i-blog.csdnimg.cn/blog_migrate/0e337ec44e7392abf366dcb334c9d204.jpeg)
问题描述:
执行nginx stop命令,提示-bash: nginx: 未找到命令
如图:
![](https://i-blog.csdnimg.cn/blog_migrate/dade9a7dae14826cc055dab4717d632f.png)
解决方式
1、打开环境变量所在的文件:
1 | vim /etc/profile |
2、在profile文件末尾,加上一行
指向你的nginx的安装位置的sbin 目录
1 | export PATH=$PATH:/usr/local/nginx/sbin |
3、重新加载环境,解决
1 | source /etc/profile |
问题描述:
执行nginx stop命令,提示-bash: nginx: 未找到命令
如图:
解决方式
1、打开环境变量所在的文件:
1 | vim /etc/profile |
2、在profile文件末尾,加上一行
指向你的nginx的安装位置的sbin 目录
1 | export PATH=$PATH:/usr/local/nginx/sbin |
3、重新加载环境,解决
1 | source /etc/profile |