Where is the default terminal $PATH located on Mac?

后端 未结 4 1479
挽巷
挽巷 2021-01-30 00:52

I have been looking throughout the system but I cannot find it. When I do echo $PATH I get the stuff I added, plus the default path. I do not have a .profile, and I do have a .b

4条回答
  •  你的背包
    2021-01-30 01:22

    Many system-wide settings including PATH are set in /etc/profile which is read in by bash at startup. On Mac OS X this file usually uses path_helper to set PATH. This utility in turn reads the information from other system configuration files under /etc (see path_helper manpage).

    Note that even if you disable the reading of the initialization files by bash (e.g. with command-line options like --noprofile) it will still inherit the environment of the parent process.

提交回复
热议问题