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

How to set environment variables under linux

王林
Release: 2020-05-18 16:40:14
Original
2704 people have browsed it

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
Copy after login

Add below:

Export  PATH="$PATH:/NEW_PATH"
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template