How to set ANT_HOME on Ubuntu Desktop 12.04?

前端 未结 6 1678
时光取名叫无心
时光取名叫无心 2021-02-09 08:12

It looks like Ubuntu uses ~/.bashrc, ~/.bash_profile, ~/.pam_profile, /etc/environment, and /etc/profile in very

6条回答
  •  萌比男神i
    2021-02-09 08:54

    BEST way to set environment variables GLOBALY

    Step 1 :
    Set all variables in /etc/environment like this

    JAVA_HOME=/usr/lib/jvm/java-6-sun
    ANT_HOME=/usr/....
    set path="/usr/bin::$JAVA_HOME/bin:$ANT_HOME/bin"
    

    Step 2 :
    Add this line at the end of ~/.bashrc of each user

    source /etc/environment
    

    Step 3 :
    Execute the following command to make the changes.

    source ~/.bashrc
    



    Hope it helps..!!

提交回复
热议问题