1

我有这个 .bashrc 文件

#PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting

[[ -s "$HOME/.rvm/scripts/rvm" ]] && \. "$HOME/.rvm/scripts/rvm" 
export PS1="\u @\w >"

#redefine a command to add options
alias mv='mv -i'
alias cp='cp -i'
alias rm='rm -i'
alias df='df -h'
alias du='du -h'
alias mkdir='mkdir -p'
alias ls='ls -lahG'
export LESS='-N'

我有这个 .bash_login 文件

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a     shell session *as a function*

我有这个 .bash_profile 文件

#This file only runs when user first logs in

#[[ -s "$HOME/.rvm/scripts/rvm" ]] && \. "$HOME/.rvm/scripts/rvm" 
#export PS1="\u @\w >"

if [ -f ~/.bashrc ]; then
    source ~/.bashrc
fi

我想将此路径添加到我的 $PATH 变量中,以便系统可以找到该程序。

/Library/PostgreSQL/9.1/bin/

我应该将此添加到哪个文件?

谢谢

4

2 回答 2

3

只需输入您的 .bashrc:

export PATH=/Library/PostgreSQL/9.1/bin/:$PATH
于 2012-04-25T18:58:14.417 回答
0

我把环境相关的东西放进去.bash_profile

于 2012-04-25T19:18:27.623 回答