export VARNAME="my value" # shorter, less portable version
#open terminal and type:
$ nano .bashrc
#scroll to the bottom of the script and type:
export <place variable name in here> = '<place variable value here>'
#e.g
export ANDROID_SDK_ROOT='/home/<$USER>/Android/Sdk'
#once you,re finished typing in your variable hit Ctrl+X then press enter
# Linux - Bash
# syntax
# export *<variable-name>=*<variable-value>;
# example
export ORACLE_SID='sales_database';
# syntax
# setenv SHELL *<filepath-of-file-containing-environment-settings>
# example
setenv SHELL /usr/bin/bash
export JAVA_HOME=/opt/openjdk11
vi ~/.bash_profile