I tried to add a path variable in /etc/environment on Ubuntu.
JAVA_HOME=/usr/local/java/jdk1.8.0_31
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
PATH=$PATH:$JAVA_HOME/bin
After I quit the shell and login again, it seems the $PATH has been messed up. Many common commands like ls, vim don't work anymore. I run echo $PATH and the output is:
$PATH:$JAVA_HOME/bin
Apparently, the "$" is not parsed correctly here. I wanna keep using "$" as it provides certain flexibility. Is there a work-around for this issue?
Aucun commentaire:
Enregistrer un commentaire