The general policy for environment variables is that they are configuration inputs, similar to command-line options and arguments. For the most part, we use environment variables for settings that rarely change. We'll often set them via the
.bash_profile files so that the values apply every time we log in. We may set the environment variables more globally in an
/etc/bashrc file so that they apply to all users. We can also set environment variables on the command line, but these settings only last as long as the session is logged in.
In some cases, all of our configuration settings can be provided on the command line. In this case, the environment variables could be used as a ...