标签 command 下的文章

bash: nginx: command not found

nginx 安装目录 /usr/local/nginx/sbin/nginx

在用户目录下 touch .bash_profile ,添加PATH:

PATH=$PATH:/usr/local/nginx/sbin
export PATH

刷新 source .bash_profile

此时 which nginx 可以输出正确的路径。