1、Modify / etc / profile
1.1 :First, set the environment variable in this file;
1.2:Run the export command to load the new environment variable settings good environment variable.
#vim /etc/profile
2、Modifying .bashrc
# vim /root/.bashrc
export PATH=”Variable Path
3、Modified directly with the export command in a shell
#export PATH=”$var_PATH”
#export from the newly loaded environment variables to view all environment variables under the current system.
Original article written by LogStudio:R0uter's Blog » linux set environment variables method
Reproduced Please keep the source and description link:https://www.logcg.com/archives/540.html