Linux Learning Record--Environment Variable Configuration File-Introduction

Linux environment variables are mainly to permanently save the set environment variables, which can be effective for all shells after setting. After setting the environment variable, you must use the following command to reload the environment variable to make the environment variable take effect.

1. Source environment variable file or .configuration file.

Common configuration files in Linux are as follows:
/etc/profile 
/etc/profile.d/*.sh (indicates that all files ending in .sh in the directory are environment variable configuration files)
~/.bash.profile
~/ .bashrc
/etc/bashrc

The configuration files in the etc/ directory are valid for all logged-in users as long as the configuration takes effect, and the configuration files in the ~ directory are valid only for the currently logged-in user, not for other users.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326121651&siteId=291194637