linux add env code example Example 1: add environment variable linux source ~/.bash_profile Example 2: add environment variable linux export JAVA_HOME=/opt/openjdk11