Shell variables are unique names that store values. When variables are referenced the values they contain are fetched. Variables are case sensitive so VAR, Var, and var are all unique.
One may assign made-up variables but there are also many built-in variables that have unique meaning for the shell. One such built-in variable is HOME which contains the name of one’s home directory. Variables can be used by scripts and programs on the system according to certain conventions.
One convention is to use the variable EDITOR for storing a user’s preferred text editor; programs launching an editor usually launch the one specified by that variable.
Shell variables are often used when writing shell scripts.
The next few posts will discuss the use of Bash shell variables and give some examples of their use. For a complete list of built-in variables on your machine consult your local man pages.