What does path mean in linux

WBOY
Release: 2022-03-15 16:24:00
Original
6294 people have browsed it

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.

What does path mean in linux

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

What does path mean in Linux?

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template