所有帳號都加入環境變數
vi /etc/profile
export JAVA_HOME=/usr/java/jdk1.6.0_13
export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib:./
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/bin
source /etc/profile
單一帳號加入環境變數
vi /home/alanchang/.bash_profile
export JAVA_HOME=/usr/java/jdk1.6.0_13
export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib:./
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/bin
如果要立即讓變數生效
source /home/alanchang/.bash_profile
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-3918892538901115"
data-ad-slot="3669889720"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
留言列表