In Linux, environmental variables are set by giving the variable name, the equal sign (=), and then the value to which the variable should be set. The variable must then be exported with the export command so it can become available to subsequent commands. While the system sets most of the environmental variables, but variables like $ORACLE_HOME need to be set by the user. Here is an example to set the environment variable for Oracle 11g in Linux or Unix systems.
Set $ORACLE_HOME Environment Variable Example
$ ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 $ export ORACLE_HOME $ echo $ORACLE_HOME /u01/app/oracle/product/11.2.0/dbhome_1