Home >Operation and Maintenance >Linux Operation and Maintenance >How to set environment variables under linux
You can modify the bashrc file. This method is safer. It can control the permissions to use these environment variables to the user level. This is for a specific user. If you need To give a user permission to use these environment variables, you only need to modify the .bashrc file in his or her personal user home directory.
Specific method:
vim ~/.bashrc
Add below:
Export PATH="$PATH:/NEW_PATH"
Recommended tutorial: linux tutorial
The above is the detailed content of How to set environment variables under linux. For more information, please follow other related articles on the PHP Chinese website!