Curl Cheatsheet


curl is used in the command line or in scripts to transfer data. It is also used nearly everywhere: in cars, television sets, routers, printers, audio equipment, mobile phones, tablets, settop boxes, media players and is the internet transfer backbone for thousands of software applications affecting billions of humans daily.

A little history: The name stands for “Client URL”, which was first released in 1997. The original author and lead developer is the Swedish developer Daniel Stenberg, who created cURL because he wanted to automate the fetching of currency exchange rates for IRC users.

Download a single file


Download a file and specify a new filename

curl -o

Download multiple files

curl -O URLOfFirstFile -O URLOfSecondFile

Download all sequentially numbered files (1-24)


Download a file and pass HTTP Authentication

curl -u username:password URL

Download a file with a Proxy

curl -x http://addressiwantto.access

Download a file from FTP

curl -u username:password -O

Get an FTP directory listing


Resume a previously failed download

curl -C - -o

Fetch only the HTTP headers from a response

curl -I

Fetch your external IP and network info as JSON


Limit the rate of a download

curl --limit-rate 1000B -O

Get your global IP


Get only the HTTP status code

curl -o /dev/null -w '%{http_code}\n' -s -I URL