A variable is simply a string to which we assign a certain type of data, which could be some text, a number, a filename or other types of data.

Naming a variable

To name a variable in Unix we can only use letters, numbers or the underscore character (_).
Other characters can't be used because they have a special meaning in Unix Shell.
Some simple examples are:

Defining a variable

To define a certain variable, we use the following base case:
Let me show you a simple example:
To access a variable we have to use the dollar sign ($). So if I want to access VAR_1, I have to write:
echo $VAR_1

Deleting a variable

Deleting a variable means that the shell will remove a certain variable from the list of those that it tracks.
To delete a variable we use the following command:
unset variable_name
which in our case would be:
unset VAR_1

Protecting variables

To protect a certain variable, we can set it as read-only so that it can't be changed or deleted.
So, if we try to change the value of VAR_1, the result will be the following:
readonly VAR_1
    VAR_1: This variable is read only.
If we try to delete the variable, the shell will give us the following error:
unset VAR_1
    VAR_1: This variable is read only.