Introduction to environment variable configuration files

The role of an environment variable
Defines the user's operating environment.
For example: path, ps1
 
Two source command
sourcece configuration file
or
. config file
After modifying the configuration file, you must log out and log in again to take effect. You can use the source command without logging in again.
 
Introduction to three environment variable configuration files
Environment variables such as PATH, HISTSIZE, PS1, and HOSTNAME are written into the corresponding environment variable configuration files.
The environment variable configuration file mainly defines the system default environment variables that take effect on the system operating environment, such as PATH.
 
Four common environment variable configuration files


 
The above environment variables are used when logging in.
The configuration file placed in the home directory only works when the current user is logged in.
The configuration files placed in the etc directory work for all users to log in.
 
 
 

Guess you like

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