Home > Article > Operation and Maintenance > What do linux environment variables mean?
In Linux, environment variables are a very important concept. Environment variables can be set by the system, users, shells, and other programs. A variable is a string that can be assigned a value, and the assignment range includes numbers, text, file names, devices, and other types of data.
Environment variables generally refer to some parameters in the operating system that specify the operating environment of the operating system. It is equivalent to a pointer. If you want to view the value of a variable, you need to add "$".
Classification of environment variables
Divided according to the scope of action
Variables in Linux can be divided into environment variables And local variables:
1) Environment variables: equivalent to global variables, exist in all Shells, and have inheritance;
2) Local variables: equivalent to local variables only exist in the current Shell , local variables include environment variables, and non-environment variables do not have inheritance.
According to the life cycle
1) Permanent: The configuration file needs to be modified, the variable takes effect permanently;
2) Temporary: Use export definition, close Invalid after Shell.
The above is the detailed content of What do linux environment variables mean?. For more information, please follow other related articles on the PHP Chinese website!