There appears to be a consensus that the PATH for macOS (any model) is a few worth set (completely) in /and many others/paths and user-maintained shell scripts (notably /and many others/profile and ~/.profile in addition to numerous .bash* (and different) recordsdata. However that’s clearly not the whole story. (I exploit ksh as my major shell.) For instance, my /and many others/paths file comprises:
/usr/native/bin
/Volumes/Satechi.SSD.M2/homebrew/bin
/System/Cryptexes/App/usr/bin
/usr/bin
/bin
/usr/sbin
/sbin
The folders named within the numerous /and many others/paths.d recordsdata mix into this:
/var/run/com.apple.safety.cryptexd/codex.system/bootstrap/usr/native/bin
/var/run/com.apple.safety.cryptexd/codex.system/bootstrap/usr/bin
/var/run/com.apple.safety.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
/Library/Apple/usr/bin
/choose/X11/bin
My /and many others/profile comprises the next (concerning PATH) :
export PATH="/usr/native/bin:${HOME}/bin:/homebrew/bin:/homebrew/sbin:/homebrew/Cellar/[email protected]/8.1.31/bin:${PATH}"
and my ~/.profile comprises:
export PATH="/usr/native/bin:${HOME}/bin:/homebrew/bin:/homebrew/sbin:/homebrew/Cellar/[email protected]/8.1.31/bin:${PATH}"
however after I log in through ssh, that is the preliminary PATH:
/usr/native/bin:/Customers/dennis/bin:/homebrew/bin:/homebrew/sbin:/homebrew/Cellar/[email protected]/8.1.31/bin:/usr/native/bin:/Customers/dennis/bin:/homebrew/bin:/homebrew/sbin:homebrew/Cellar/[email protected]/7.4.29/bin:/usr/native/bin:/Volumes/Satechi.SSD.M2/homebrew/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.safety.cryptexd/codex.system/bootstrap/usr/native/bin:/var/run/com.apple.safety.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.safety.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/choose/X11/bin:/Library/Apple/usr/bin:/Customers/dennis/bin:/homebrew/bin:/homebrew/sbin:/choose/homebrew/Cellar/[email protected]/7.4.29/bin:/usr/native/bin
There are a couple of issues right here, most notably the truth that a lot of no-longer-existent folders are named (e.g. the php7.4 stuff).
I see no .bash* nor .ksh* recordsdata in any respect in my dwelling listing, so from the place do all these different folder references come? I’ve appeared within the Customers & Teams settings inside System Settings – there may be virtually nothing there – and have finished pretty in depth searches on web generally and StackOverflow and AskDifferent specifically – with no definitive solutions past these talked about above.
How can I decide the place to make the required modifications in order that I can do cleanup?
(Notice: In preparation for this query, I recognized the /and many others/paths.d folder which comprises references to the now out of date /var/run.com/apple.safety.cryptexd folder, which I will likely be coping with forthwith.)
