Maports在mac中改变我的$ PATH在哪里?

时间:2014-07-05 03:50:18

标签: bash environment-variables macports path-variables

我认为macport设置$ PATH的唯一方法是通过〜/ .bash_profile或〜/ .profile。我已经检查过我没有〜/ .bashrc。但在评论出来之后:

 #export PATH=/opt/local/bin:/opt/local/sbin:$PATH

我的$ PATH

中仍然有/ opt / local / bin
$echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/local/texlive/2012/bin/x86_64-darwin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/texbin

我想知道macport在哪里改变了我的PATH变量,它应该在加载〜/ .bash_profile之后,因为我在〜/ .bash_profile中添加了texlive路径到路径的开头。

1 个答案:

答案 0 :(得分:0)

在OSX上,启动交互式bash终端时执行的文件序列如下:

/etc/profile
/etc/bashrc
~/.bash_profile

必须是其中之一。查看我.bash_profilemacports留下的评论。