bash: nginx: command not found January 5, 2017 nginx 安装目录 /usr/local/nginx/sbin/nginx在用户目录下 touch .bash_profile ,添加PATH:PATH=$PATH:/usr/local/nginx/sbin export PATH 刷新 source .bash_profile此时 which nginx 可以输出正确的路径。