Three methods of setting Environment variable by linux
How to set the environment variable of linux? This problem may be often seen in our daily work. Through this question, I hope you can gain more. Let's take a look at the solution with the editor today.
1. Temporary
Export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:new_path_name
Where new_path_name is the new path. This is only valid for the current shell. Restart and disappear.
2. Permanent
Vim / etc/profileexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:new_path_namesource / etc/profile
The global environment variable, the restart does not disappear, is valid for all users.
3. Permanent
~ / .bashrcexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:new_path_namesource .bashrc
The global environment variable, the restart does not disappear, but is only valid for the currently logged in user.
This is the end of the three methods of setting environment variables in linux. Solving the problem is not just the method analyzed in the article and everyone, but the accuracy of the analysis method in this article is indisputable. If you like this article, you might as well share it for more people to see.