when adding env varialbes like:
where is this stored if I want to edit it later? is it a file somewhere?
When you export an environment variable it is not stored in any non-volatile memory like hard disk or such. It is only remembered by shell, moreover, only in the shell you ran this command in, either by hand or with a script. So a reply to your first question may be "it is stored only in memory, local to running shell". Of course anything you will run from the shell will inherit it's environment.
If you want to change the value of environment variable, just run
If you want it to be set only in Terminal windows, you can add the
What do you mean edit it later? Export it again. It shouldn't matter where it is stored, I imagine the implementation could be shell-specific, maybe the shell performs caching of variables. Maybe it doesn't. Either way, you can read and write the environment variables in the shell so I can't imagine why you need this file.
For the record the file is