The default PATH variable with an empty .bash_profile

I remember after a new installation of os x, when I did echo $ PATH in the terminal, it answered with an empty line. Now after installing some tools over time, the $ PATH variable has / usr / bin: / bin: / usr / sbin: / sbin: / usr / local / bin: / opt / X11 / bin, although my .bash_profile is empty. I was wondering where this value is set?

+4
source share
1 answer

Valid candidates would be /etc/profile and /etc/bashrc ; there are also /etc/paths and /etc/paths.d . You may also need to look at $HOME/.profile and $HOME/.bashrc . There may be other places that bash looks like.

+4
source

Source: https://habr.com/ru/post/1493777/


All Articles