A brief introduction found on Medium:
Everyone knows what are variables, Data stored somewhere in memory when referenced by some indicator (variable name).
Environment variables are none other than variables, It’s just that data stored in that variable is what describes environment behaviour.
So now I think it is clear that why environment variables are so useful and interesting, One can control environments behaviour just by setting, altering, deleting several environment variables.
Before we dive into playing with ENVs (environment variables) it is important to understand where to set them.
All the play with ENVs will be done in a beautiful place known as the command line. One can access command line using Terminal.