I have been trying to set environment variables that would be saved upon reboot, but without success.
When I set variables using the export
or setenv
command, as root or any other user, it gets saved on the session until reboot. After reboot, the variables are lost.
In particular, I need to set $JAVA_HOME
.
So I do like this
but nothing is working as I indicated.
What am I doing wrong?
.bashrc
and methods that only work for a single user. This question requires a system-wide method such as the one suggested by @tagwint – Routhinator Jun 28 '18 at 17:10