Not good at writing articles, scholars write it.
Environment Variables :
- A variable is a symbol that is used in a computer to record a value (not necessarily a number, or a character or a string), and these symbols are used in different arithmetic processing. Usually a variable is a one-to-many relationship with a value, you can assign a value to another variable by reading its value, or you can assign a value to any variable directly.
- An environment variable is a scope larger than a custom variable, such as a shell's environment variable acting on itself and its child processes. In all Unix and Unix-like systems, each process has its own set of environment variables, and by default, when a process is created, it is explicitly specified in the process creation, and it inherits most of the environment settings of its parent process. The shell program also runs on the operating system as a process, and most of the commands we run in the shell will run as a child process of the shell.
There are three types of environment variables that we will typically relate to:
- The current shell process private user-defined variables, such as the TEMP variable we created above, are only valid in the current shell.
- The built-in variables of the Shell itself.
- An environment variable exported from a custom variable.
Environment variables and file lookups