where does it get written to?? does it stay in ram??
Yep ... :) ...just RAM.
Or are there other uses??
Sure are :) ... for instance $PATH is quite vital
for all you do in your system ...
just do an env on your bash-prompt and modify
a few of them ;)
Why are they kept in memory rather than in a file?
I'd assume it's got to do with the olden days when
HDDs were just soooo slow, and if more or less with
everything you do on the comp the file needs to be
read again ... :)