向Bash添加Psql路径

2024-04-26 11:51:49 发布

您现在位置:Python中文网/ 问答频道 /正文

我目前的bash配置文件中有:

export WORKON_HOME="$HOME/.virtualenvs"
source /usr/local/share/python/virtualenvwrapper.sh
# Setting PATH for EPD_free-7.3-2
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
export PATH

我想补充一点:

PATH="/Applications/Postgres93.app/Contents/MacOS/bin:$PATH"

我要怎么加进去?你知道吗


Tags: pathbashsharesourcehomebinusrlocal
2条回答

将其添加到export PATH部分之前:

export WORKON_HOME="$HOME/.virtualenvs"
source /usr/local/share/python/virtualenvwrapper.sh
# Setting PATH for EPD_free-7.3-2
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
PATH="/Applications/Postgres93.app/Contents/MacOS/bin:$PATH"
export PATH

两个PATH=..行的最后一部分,读取:$PATH或等价地:${PATH},确保不覆盖现有值。你知道吗

export PATH前面加上那一行就行了

相关问题 更多 >