$ PATH在哪里设置?特别是在哪里设置了我的mac端口路径? [英] where is $PATH set? Specifically where is my mac port path being set?

查看:267
本文介绍了$ PATH在哪里设置?特别是在哪里设置了我的mac端口路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我这样做

 echo $PATH

请参阅:

  /opt/local/bin:/opt/local/sbin:/opt/local/lib/postgresql84/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/local/mysql/bin:/usr/X11/bin

我想将/opt/local内容移动到路径的末尾,因为它会导致gitk错误. (此处指定了相同的错误:启动gitk错误)

I want to move the /opt/local stuff to the end of the path because it is causing errors with gitk. (the same error specified here: Starting gitk Error)

我已经注释掉了.bash_profile中的export PATH行,但是我的路径仍然像上面一样设置.我还检查了etc/paths.d,但那里没有任何Mac端口信息.我在.profile中注释了类似的export PATH行.同样,我的路径仍然是STILL,在前面包含/opt/local.在哪里设置?

I've already commented out the export PATH line in my .bash_profile, but my path is STILL set like the above. I also checked etc/paths.d but don't see anything for mac ports in there. I commented out a similar export PATH line in my .profile. Again my path is STILL containing /opt/local in the front. WHERE ELSE is this being set?

我正在使用Mac OS Snow Leopard 10.6.8

I'm using mac os snow leopard 10.6.8

推荐答案

在我的系统上,MacPorts安装程序将其放入/etc/profile中.

On my system, MacPorts installer put it into /etc/profile.

(完整?)文件列表如下(按bash读取它们的顺序):

The (full?) list of files is as follows (in the order bash reads them):

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

这篇关于$ PATH在哪里设置?特别是在哪里设置了我的mac端口路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆