我有这个.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/
我应该将此文件添加到哪个文件?
由于
答案 0 :(得分:3)
只需输入你的.bashrc:
export PATH=/Library/PostgreSQL/9.1/bin/:$PATH
答案 1 :(得分:0)
我将与环境相关的内容放在.bash_profile