I use a mac. If I open a terminal and run echo $PATH I get the current PATH variable in my environment. If I add something to my path or to my other environment variables, it only persists for as long as that process is alive.What I want to know is, how did this path get the values it has by default? I looked in my .zshrc (or .bash* if I were using bash) but there's nothing there that exports all programs that are on the path. What is it about the OS the controls this default PATH list?
How does the unix path get set when the computer first starts?
linux;osx