Jaden Chaca
Jaden Chaca

Reputation: 97

Windows how does the "Path" environment variable work?

I recently added python to my environment variables when this question popped into my head. When I type "python" into command prompt, windows seems to know which file to run. However, I added python into this environment variable called "Path", and never specified "python" anywhere.

I don't understand how windows knows what I want when I type "python". Could someone help clear this up?

Upvotes: 2

Views: 3899

Answers (1)

Ahmad Farhan
Ahmad Farhan

Reputation: 605

PATH is an environment variable that holds values related to current user and operating system. It specifies the directories in which executable programs are located. so when you type python window gets its executable from PATH. hence, you won't need to type the whole path to the file on command line.

Upvotes: 3

Related Questions