I have set my environmental variable $JAVA_HOME
within the /etc/environment
file. Worked like a charm! Now I want to remove it. After removing the line completely from the environment file, then do a reboot, it continues to resolve the path on:
echo $JAVA_HOME
How do I clean that out?
$JAVA_HOME
will already have a definition on many systems without explicitly declaring it in/etc/environment
:That said, the
unset
command will eliminate a variable. From: Unix / Linux - Using Shell VariablesIn our case we can use: