Enable export of all environment variables in bash
When setting up environment variables, for example in .profile you can write the following near the top of the file to enable exporting of all the environment variables without explicitly writing “export” each time:
set -o allexport
with the above, then you can just write the following, for example:
To disable the all export:
set +o allexport
You are also able to set environment variables without the export or allexport, however that will NOT make the variable available to sub-processes.