echo 'export PATH="/Users/aa/PostgreSQL/pg95/bin"' >> ~/.bash_profil
直接在命令行里面运行以上命令即可,就是这么简单。
这里是把 export PATH=" " 这行添加进了 ~/.bash_profil 文件,添加到这里这个环境变量仅仅对当前用户有效。
你还可以添加进:
etc/profile
/etc/paths
~/.bash_profile
~/.bash_login
~/.profile
~/.bashrc