Exploring Environment Variables
The bash shell uses a feature called environment variables to store information about the shell session and the working environment (thus the name environment variables). This feature also allows you to store data in memory that can be easily accessed by any program or script running from the shell. It is a handy way to store needed persistent data.
There are two environment variable types in the bash shell:
- Global variables
- Local variables
This section describes each type of environment variable and shows how to see and use them.