Steps to add path system environment variable in windows

Table of contents

1. What are system environment variables?

2. Why add the path environment variable?

3. Steps to add path environment variable

3.1. Method 1

3.2. Method 2


说明:

1)以下的内容是基础知识、适合脑子空白或懒得进行记忆

2)环境:window 10

3)path环境变量主要用于配置:软件、可执行程序、

1. What are system environment variables?

        An environment variable is an object with a unique name in the operating system that contains information used by one or more applications.

        Generally refers to some parameters used in the operating system to specify the system operating environment, such as: temporary folder location and system folder location, etc.

2. Why add the path environment variable?

   The system handles it like this:    

        Before the path environment variable is configured: When the system is required to run a program or search for a program without specifying the full path to search for the program, the system will only search for the program in the current directory.

        After configuring the path environment variable: When the system is required to run a program or search for a program without specifying the full path to search for the program, the system will also search for the program in the path specified in the configured path.

Effect: Better running process

Simple example:

        I want to run the cmd program on the computer I just bought (the path variable of cmd is not configured at this time). An error may occur during the operation because the system cannot find your cmd.exe for execution when executing your cmd command.

        The same goes for running code. You need to compile the code, but the system cannot find your code interpreter at the current location, and an error will appear.

Solution:

        After finding the installation path and configuring it through the following steps, the system will not report an error that cannot be found.

Note: The installation path cannot be found. It is recommended to solve it through a search engine.

3. Steps to add path environment variable

3.1. Method 1

1) Right click on this computer and open properties, as shown in Figure 1 below

 

figure 1

2) Enter the advanced system settings, as shown in Figure 2 below

 figure 2

3) Enter to edit the path variable, as shown in Figure 3 below

 image 3

4) Add the path variable, as shown in Figure 4 below

 

Figure 4

3.2. Method 2

This method is to solve the problem that the computer icon cannot be found on the computer desktop.

1) Use the computer’s built-in quick search to find environment variables

 

Note: Other configuration steps are the same as method 1.

Guess you like

Origin blog.csdn.net/qq_57663276/article/details/128385465