vim /etc/profile

在 后面添加命令位置,例如nginx:
export PATH=/usr/local/nginx/sbin:$PATH
保存更改并退出

使配置生效:
source /etc/profile

相关文章: