5.3 Setting the Oracle Database XE Environment Variables

After you have installed and configured Oracle Database XE, you must set the environment before using Oracle Database XE.

The oraenv and coraenv scripts can be used to set your environment variables. 

For example, to set your environment variables in Bourne, Bash, or Korn shell without being prompted by the script:

$ export ORACLE_SID=XE 
$ export ORAENV_ASK=NO 
$ . /opt/oracle/product/18c/dbhomeXE/bin/oraenv

ORACLE_HOME = [] ? /opt/oracle/product/18c/dbhomeXE
The Oracle base has been set to /opt/oracle
For C shell:
$ setenv ORACLE_SID XE
$ source /opt/oracle/product/18c/dbhomeXE/bin/coraenv

See Oracle Database Administrator's Reference for Linux and UNIX-Based Operating Systems for more information about setting a common environment