Explanation how paths are included or expanded in iTerm2
This is more a request for info than a bug. Putting iTerm2 to default settings AND removing my .bash_profile
, I notice that echo $PATH
includes several paths that the same command in Terminal does not have. I.e., running echo -e ${PATH//:/\\n}
command in Terminal gives this:
/usr/local/bin
/usr/local/sbin
/usr/bin
/bin
/usr/sbin
/sbin
/opt/X11/bin
/Applications/Wireshark.app/Contents/MacOS
While in iTerm2 gives this:
/usr/local/bin
/usr/local/sbin
/usr/bin
/bin
/usr/sbin
/sbin
/opt/X11/bin
/Applications/Wireshark.app/Contents/MacOS
/usr/local/opt/libpcap/bin
/usr/local/opt/e2fsprogs/sbin
/usr/local/opt/e2fsprogs/bin
/usr/local/opt/flex/bin
/usr/local/opt/gettext/bin
/usr/local/opt/openssl@1.1/bin
/usr/local/opt/openssl/bin
/usr/local/opt/qt/bin
/Library/Frameworks/GDAL.framework/Versions/2.1/Programs
/Library/Python/2.7/site-packages/
/usr/local/lib/python2.7/site-packages
/Users/myuser
I removed my .bash_profile
and I don't have any .profile
or .bashrc
to my knowledge, so both apps should be importing paths from /etc/paths
and /etc/paths.d/
. In the first file, I've got the /usr/local/bin through /sbin entries, and in the paths.d folder I have two files that add the X11 and Wireshark entries. Notably, the additional paths picked up by iTerm2 are from homebrew.
Could someone please edify me on how iTerm2 is picking up the extra paths?