Home  >  Article  >  Operation and Maintenance  >  How to set environment variables under linux

How to set environment variables under linux

王林
王林Original
2020-05-18 16:40:142675browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn