November 2015
Beginner
282 pages
5h 5m
English
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 env or 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_VAR1:
$ env | grep ENV_VAR1 # Verifying that ENV_VAR1 doesn't exist $ export ENV_VAR1='New ...