Where is the beginning of the PATH in Git Bash?

本秂侑毒 提交于 2019-12-11 08:23:38

问题


On Windows, the PATH is separated into 2 parts, the System PATH & the User PATH. They can both be displayed and changed in the Control Panel (though not very well).

While running msysGit or Git for Windows, a 3rd PATH is created and put before the other 2, meaning programs will look in this 3rd PATH's folders for a command before the User or System PATH folders. I think msysGit created it because I chose the "Run Git and included Unix tools from the Windows Command Prompt" option during installation (correct me if I'm wrong):

Where does msysGit/Git for Windows store this PATH, and how can I change it?

回答1:


This part of the PATH is in /etc/profile (with / being wherever msysGit or Git for Windows is stored). This is similar to how Linux & UNIX do it, with /etc/profile being one of the places Bash looks for start-up scripts.



来源:https://stackoverflow.com/questions/22231313/where-is-the-beginning-of-the-path-in-git-bash

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!