Take NASM as an example, after the software installation is complete, start the Windows operating System Command window, in the installation directory (such as C:\Program files\nasm) run NASM is OK, but run in any other directory NASM will report an error.
This means that we cannot use the NASM command because, although we have installed NASM, and the installation directory contains the NASM command, the computer does not know where to go to find the two commands. But if we say go into the installation directory of NASM, and then run the NASM command sequentially, it can be run normally. How does a computer find a command? The Windows operating system looks for commands based on the PATH environment variable. The value of the PATH environment variable is a series of paths where the Windows operating system looks for commands in this series of paths. Note: In the Windows operating system is not case-sensitive, and in the Linux system, we should set the PATH environment variable.
Set environment variables on the Windows platform if:
Add environment variable to the system variable, properties----environment variable---
For Windows systems, an environment variable named path is stored, and you can modify the environment variable directly, appending C:\Program files\nasm after the value of the environment variable. Then open a new command window and run path to see if the new environment variable exists.
Running the NASM command in any directory is OK.
The general recommendation is to add environment variables to the user variables .
User variables differ from system variables: There is no big difference between user variables and system variables, except that user variables are only valid for the current user, and system variables are valid for all users. However, system variables are preceded by user variables, and if two places contain the NASM command, the NASM command contained in PATH system variable paths will be executed preferentially.
Add environment variables to Windows