When a new shell is launched, it has the initial environment set that will be used by any application or command that gets executed in a given shell. We now know that the
setenv shell builtin command can be used to view which environment variables are set for this shell. The shell also provides the capability to modify the current environment. We can also modify the current bash environment by creating, modifying, or deleting environment variables.
To create a new environment variable in a shell, the
export shell builtin command is used.
For example, we will create a new environment variable
$ env | grep ENV_VAR1 # Verifying that ENV_VAR1 doesn't exist $ export ENV_VAR1='New ...