To install software in linux, you must add the Software Directory to the system PATH variable. To use the software, you only need to enter the software name, without the complete path of the software. Suppose we have installed a new apache-ant tool. Its path is/opt/ant. the software installation documentation often only tells you how to add a new PATH temporarily, that is, "export PATH = $ PATH: newProg". You need to add a new PATH for the next login. Therefore, knowing how to add a new PATH to the PATH variable permanently is a basic skill for linux players. Because linux is a multi-user operating system, it also supports multiple users in terms of paths. Therefore, adding paths can be divided into user-effective and system-effective ones. add the PATH variable to a specific user. The user's home directory contains a hidden file called. open bash_profile and add a PATH = $ PATH:/opt/ant/bin to save and close the file. The newly added PATH takes effect after the user logs on to the file. In the end, this file is like this #. bash_profile # Get the aliases and functionsif [-f ~ /. Bashrc]; then .~ /. Bashrcfi # User specific environment and startup programs PATH = $ PATH:/opt/ant/bin export PATH2. add an ant to the PATH variable of the system/(all users. sh text file to/etc/profile. d/directory, open it and type export PATH = $ PATH:/opt/ant/bin to save and exit. The next login will take effect.