Home  >  Article  >  Operation and Maintenance  >  What do linux environment variables mean?

What do linux environment variables mean?

藏色散人
藏色散人Original
2019-06-01 14:40:0411062browse

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.

What do linux environment variables mean?

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!

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
Previous article:why use linuxNext article:why use linux