Setting Ubuntu Environmental Variables for all users

Accroding to: https://help.ubuntu.com/community/EnvironmentVariables

Setting in /etc/environment or create a /etc/profile.d/*.sh file should work.

But I use the later one.

I created set_env_vars.sh in /etc/profile.d/ folder with content below:
export PATH="$PATH:/usr/local/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/oracle/12.2/client64/bin"
export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin"

It works after reboot.

Comments

Popular Posts