>_How the Terminal Works · Lesson 4 of 7
Environment Variables & Shell Startup
Why does PATH exist in every window? What is .bashrc actually for? Environment variables are the shell's inheritance system — settings that flow parent to child, window to program.
Programs read the environment for configuration: EDITOR tells git which editor to open, HOME tells everything where your files live, NODE_ENV switches app behavior, API keys arrive in CI this way. It's the universal config channel — no files, no flags, inherited automatically.
✦ Tip
Now installer instructions make sense: 'add this line to your .bashrc' means 'make this environment change happen in every future shell'. And when a tool works in one terminal but not another — diff their env output; it's almost always PATH.
Now installer instructions make sense: 'add this line to your .bashrc' means 'make this environment change happen in every future shell'. And when a tool works in one terminal but not another — diff their env output; it's almost always PATH.