The process of installing cURL on Windows is straightforward. Here is a detailed step-by-step guide:
Step 1: Check if cURL is Already Installed
First, verify whether cURL is installed on your Windows system. To do this, enter the following command in the Command Prompt (cmd):
bashcurl --version
If cURL is installed, the command will display the version information. If not, you will see the message: "'curl' is not recognized as an internal or external command, nor is it a runnable program or batch file."
Step 2: Download cURL
If cURL is not installed on your system, download the Windows version from the official cURL website:
- Visit the official cURL download page.
- Scroll down to the "Windows" section.
- Select a version suitable for your system (e.g., choose the 64-bit version if you are using a 64-bit system).
- Download the ZIP file.
Step 3: Install cURL
- Extract the downloaded ZIP file to the directory where you want to store the cURL program, typically the Program Files folder on the C: drive.
- Add the path of the extracted folder (usually named curl-xx.x.x, where xx.x.x is the version number) to your system environment variables. This enables you to run the cURL command from any command-line window. Follow these steps:
- Right-click "This PC" or "My Computer" and select "Properties".
- Click "Advanced system settings".
- In the System Properties window, click "Environment Variables".
- In the "System variables" section, find "Path" and click "Edit".
- In the "Edit environment variable" window, click "New" and paste the path of your cURL folder.
- Click "OK" to save the settings.
Step 4: Verify Installation
To confirm that cURL is correctly installed, reopen a Command Prompt window and run:
bashcurl --version
If the cURL version information appears, this confirms successful installation and configuration.
Example
Suppose you download the ZIP file for cURL version 7.76.0 and extract it to the C:\Program Files\curl-7.76.0 directory. After adding this path to your system environment variables, you can use the cURL command from any command-line window.