In Linux, path means environment variable. Environment variables generally refer to some parameters in the operating system that specify the operating environment of the operating system. They are equivalent to a pointer. If you want to view the value of the variable, you need to add "$". Use the "echo $PATH" command to view the current environment variables.
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
PATH refers to the environment variable. Use the command echo $PATH
to view the current environment variable. If you need to modify it, you can append it later. . For example, if you want to add /etc/apache2/bin as an environment variable, you can write:
PATH=$PATH; /etc/apache2/bin
and then press Enter.
1.1 The meaning of environment variables
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 "$".
1.2 Classification of environment variables
1.2.1 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, Non-environment variables are not inherited.
1.2.2 According to the life cycle
1) Permanent: the configuration file needs to be modified, the variable takes effect permanently;
2) Temporary: Use export definition, it will become invalid after closing the Shell .
Related recommendations: "Linux Video Tutorial"
The above is the detailed content of What does path mean in linux. For more information, please follow other related articles on the PHP Chinese website!