Linux | Cloud | DevOps | Scripting

Breaking

Thursday, 27 June 2019

Install curl in Windows



The name cURL stands for "Client URL". cURL (pronounced 'curl') is a computer software project providing a library (libcurl) and command-line tool (curl) for transferring data using various protocols.

Steps we need to follow:

1. Download and extract zip file
2. Create a folder in C-drive and paste curl.exe file in it.
3. Set Environment variable for curl
4. Verify curl using PowerShell

Step 1: Download and extract zip file:

On browser go to cURL official website: https://curl.haxx.se/ ➔ Click on Download ➔ there is a lot of stuff. But go to the last of this page, here, we can see cURL versions for Windows 64 bit.

Download curl
Fig: Download curl
Right click on the version ➔ Save link as ➔ Save the file.

Step 2: Create a folder in C-drive and paste curl.exe file in it:

Downloaded file is zip file ➔ Extract this file ➔ Open folder ➔ src ➔ Copy curl.exe ➔ create a folder in C drive, named curl ➔ paste this file in it.

So, path for curl is 'C:\curl' now.

Step 3: Set Environment variable for curl:

Windows ➔ Run ➔ sysdm.cpl ➔ Advanced ➔ Environment Variables ➔ Navigate to Path in System Variables ➔ Edit...

Set Environment Variables
Fig: Environment Variables
...in last paste ;C:\curl (change the path accordingly, if you have different path set) ➔ OK.

Set Environment Path for curla
Fig: Set Environment Path

Step 4: Verify curl using PowerShell:

Open PowerShell ➔ type curl and hit enter

This will not show any error for curl command.

Try to run 'curl www.google.com', this should display the content of google.com.

Enjoy!






No comments:

Post a Comment

Pages