Add environment variables to Windows

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.