Windows OS

How to Install and Use curl on Windows


curl is a command-line utility used on Windows, Linux, and Mac OS to transfer and receive data via various protocols, including HTTPS, SMP, FTP, SFTP, alt-svc, CA Extract, HSTS, SSL Certs, and SSL libs compared, and many more. All transfer-related functionality in curl is powered by libcurl, which is a client-side URL transfer library.

The instructions required for the installation of curl on Windows will be illustrated in this blog.

curl Installation on Windows

Follows the below-listed procedure to install curl on Windows.

Step 1: Download curl Installer File

First, download the curl installer file for curl installation by visiting the below-provided link:

https://curl.se/download.html

Press ā€œCTRL+Fā€ to view the search menu and type out ā€œWindowsā€ as shown in the highlighted bar. Then, download the curl installer file according to your system specifications. For instance, we have selected the ā€œWindows 64 bitā€ binary setup file:

Within a few minutes, the ā€œcurl-7.84.0_4-win64-mingw.zipā€ setup file will be downloaded and saved in the ā€œDownloadsā€ folder:

Step 2: Create a ā€œCurlā€ Folder

In the next step, create a new folder named ā€œCurlā€ in the C drive:

Step 3: Paste Setup Folder Into ā€œCurlā€ Folder

Go to the ā€œDownloadsā€ directory where the curl zipped folder is saved:

Before copying the curl setup folder, extract it first using right-click menu:

Select the extracted folder and press ā€œCTRL+Cā€ to copy it:

Then, move to the newly created ā€œCurlā€ folder in the C drive, open it, and press ā€œCTRL+Vā€ to paste the copied setup folder:

Step 4: Find and Copy curl Setup Path

Open the curl setup folder and go to the ā€œbinā€ folder to find the curl.exe file:

After finding the required curl.exe file, right-click on the folder path for copying it:

Step 5: Set Path in Environment Variables

After copying the curl setup file path, go to the ā€œStartupā€ menu, search for ā€œEnvironment Variablesā€, and open it from displayed results:

Upon doing so, the ā€œSystem Propertiesā€ window will appear. Click on the ā€œEnvironment Variablesā€ button:

Select the ā€œPathā€ from the ā€œSystem variablesā€ section and click on the ā€œEditā€ button:

After that, click on the ā€œNewā€ button and paste the copied curl setup file path as shown in below highlighted output. Then, click on the ā€œOKā€ button:


ā€ƒ
At this point, we have successfully installed and configured curl on our Windows system. Letā€™s verify curl installation by checking its version.

Step 6: Verify curl Installation

First, open up the command prompt using the ā€œStartupā€ menu:

Type the below-provided command in the opened window to verify curlā€™s version:

> curl --version

As you can see, we have successfully installed curl version ā€œ7.78.0ā€ on Windows.

curl Usage on Windows

On Windows, to use curl, check out the below-listed examples.

Example 1: Get URL Homepage

You can use the curl command along with the URL to get and print the Homepage of any website. For instance, the following curl command will get Google homepage:

> curl www.google.com

Example 2: Get Header Information

To get the header information of any website, use the curl command with the ā€œ-iā€ option and provide the URL:

> curl -i www.google.com

The given output displayed the header information of the Google website:

Example 3: Download Setup File

Want to download a setup file? Utilize the curl command and specify the URL of the required file:

> curl -O https://freefilesync.org/download.php

Example 4: Get Help

When a curl command is executed with the ā€œ–helpā€ option, it prints out its manual on the command prompt:

> curl --help

We have demonstrated the methods to install and use curl on Windows.

Conclusion

To install the curl command-line utility on Windows, first, download the installer setup file. After that, make a new directory curl in the ā€œCā€ drive and paste the setup into the newly created curl folder. Then, find and copy the setup path and set it in the Environment variables as discussed earlier. This blog has effectively elaborated the method to install and use curl on Windows.

About the author

Rafia Zafar

I am graduated in computer science. I am a junior technical author here and passionate about Programming and learning new technologies. I have worked in JAVA, HTML 5, CSS3, Bootstrap, and PHP.