I know the difference among ~/.bash
, ~/.profile
vs. /etc/profile
. I know (please correct me if I am wrong) configuration in ~/.bash
is applicable for a specific user and terminal only.Configuration in ~/.profile
applicable for a user only.
But sometimes I found some configuration like environment variable are also set in /etc/environment
file. What are the difference among these file?
I also found that in /etc/environment
file we do not export environment variable while we export environment variable (like PATH) from ~/.bash
and ~/.profile
-
export JAVA_HOME=/usr/lib/java #for ~/.bash or ~/.profile
JAVA_HOME=/usr/lib/java #for /etc/environment
Why these difference among the two type of ?
Thanks in advance.