Using Multiple Oracle Homes on Linux
With an entry now in the oratab file, use the oraenv command to set up the environment.  To do that, run . oraenv which causes the oraenv script to be run as part of the current shell rather than as a subprogram.

$ . oraenv

ORACLE_SID = [cdb1dev] ?
The Oracle base remains unchanged with value /u01/app/oracle


To avoid being prompted for the ORACLE_SID, for example during the execution of a script, set the ORAENV_ASK=NO:

ORACLE_SID=db_11g
ORAENV_ASK=NO
. oraenv