There are
a number of settings that the shell requires to control the way
your system behaves. Settings such as the location of your mailbox
and the type of terminal you have are all set using environment
variables. The Linux operating system has several default environment
variables such as PS1, HOME, LOGNAME, SHELL, and PATH.
When
a predefined environment variable is placed in one of the initialization
files, it is recognized globally in any shell or subshell.
You
can also temporarily change your environment variables at the
command line. This affects only the current shell. When you exit
the shell in which the environment variable has been assigned,
it is released or set back to its default value. However, permanent
changes can be made by modifying the initialization files.
Note:
The Bourne and Bash shells use the same format for setting environment
variables.