To Install Curl
For Windows Download - https://curl.se/windows/
You might already have curl
It is possible that you won't need to download anything:
· If you are on Windows Server 2019 or Windows 10 version 1803 or later, your OS already set up and ready to use.
· Default path is C:\Windows\System32\curl.exe
Installing curl manually
Extracting and setting up curl
Find curl.exe
within your downloaded package; it's probably under bin\
.
Pick a location on your hard drive that will serve as a permanent home for curl:
· Default path on versions of Windows with it already installed is C:\Windows\System32
· If you want to give curl its own folder, C:\Program Files\curl\
or C:\curl\
will do.
· If you have many loose executables, and you do not want to add many individual folders to PATH
, use a single folder such as C:\Program Files\tools\
or C:\tools\
for the purpose.
Place curl.exe
under the folder. And never move the folder or its contents.
Next, you'll want to make curl available anywhere from the command line, if not already in the folder that is already included within the path. To do this, add the folder to PATH
, like this:
1. Click the start menu. Start typing "environment".
2. You'll see the search result Edit the system environment variables. Choose it.
3. A System Properties window will popup. Click the Environment Variables button at the bottom.
4. Select the "Path" variable under "System variables" (the lower box). Click the Edit button.
5. Click the Add button and paste in the folder path where curl.exe
lives.
6. Click OK as needed. Close open console windows and reopen, so they get the new PATH
.
Then unzip it at the root of the Windows installation. Also, for ease of use assign a simple name to the folder. In my case, we chose curl:
Testing the installation.
The first thing you have to do is open a Command Prompt. With this intention press the Win+R combination and run cmd. Then navigate to the folder you unzipped by typing the following commands:
cd..
cd..
cd curl
To test the cURL installation please run the following command:
curl -V
Now let’s try a popular site, like google. With this in mind, please run the following command:
curl https://www.google.com
Adding the environment variable.
To be able to run curl, it is necessary to go to the program directory and from there run the commands. If we want to avoid this, it is necessary to edit the environment variables. In addition, add a new variable to the PATH environment. If you want to know how to do it, please see here. In this case, I only show you that the path you have to add is C:\curl
From now on we can run cURL from any Command Prompt. It is no longer necessary to scroll to the installation address.