linux set environment variables method

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 Gerber drop-off:R0uter's Blog » linux set environment variables method

Reproduced Please keep the source and description link:

About the Author

Leave a Reply

Your email address will not be published. Required fields are marked *