What Is cURL and Why Would You Use It?

About the Linux Command cURL

Screenshot of the curl command in Ubuntu


The manual page for the "curl" command has the following description:

cURL is a tool to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP). The command is designed to work without user interaction.

Basically, you can use cURL to download content from the internet. For example, if you ran the cURL command with the web address set to:


The linked page will be downloaded.

By default, the output will be to the command line but you can also specify a filename to save the file to. The URL specified can point to a site's top-level domain such as:


Or it can point to individual pages on the site.

You can use cURL to download physical web pages, images, documents, and files. For instance, to download the latest version of Ubuntu Linux you can simply run the following command:

curl -o ubuntu.iso http://releases.ubuntu.com/16.04.1/ubuntu-16.04.1-desktop-amd64.iso

Should I Use cURL Or Wget?

Whether you use cURL or Wget depends on what you are trying to achieve.

The Wget command is used to download files from networks such as the internet. The main benefit of using the Wget command is that it can be used to recursively download files. Therefore if you want to download an entire website you can do so with one simple command. The Wget command is also good for downloading lots of files.

The cURL command lets you use wildcards to specify the URLs you wish to retrieve. So if you know there is a valid URL called:




Then you can download both images with a single URL specified with the curl command.

The Wget command can recover when a download fails whereas the cURL command cannot.

Get a good idea of the cans and cannots with regards to the Wget and cURL command. Bizarrely one of the differences on this page states that you can type Wget using just your left hand on a QWERTY keyboard

Thus far there have been lots of reasons to use Wget over cURL but nothing as to why you would use cURL over Wget.

The cURL command supports more protocols than the Wget command, it also provides better support for SSL. It also supports more authentication methods than Wget. The cURL command also works on more platforms than the Wget command.

cURL Features

Using the cURL command you can specify multiple URLs in the same command line and if the URLs are on the same site all of the URLs for that site will be downloaded using the same connection which is good for performance.

You can specify a range to make it easier to download URLs with similar path names.

There is also a cURL library which the cURL command uses called libcurl. This can be used with multiple programming and scripting languages to scrape information from web pages.

Whilst downloading content a progress bar will appear with a download or upload speeds, how long the command has spent running thus far and how long there is still to go.

The cURL command works on large files over 2 GBs for both downloading and uploading.

According to this comparison table which compares curl features with other download tools, the cURL command has the following functionality:

  • Multiple URLs
  • Usernames and Passwords support
  • IPv6 support
  • Retry failed download
  • URL globbing/sequences
  • Win32 support
  • Large file support
  • GnuTLS support
  • DarwinSSL support
  • Schannel support
  • Cyassl support
  • PolarSSL support
  • AxTLS support
  • SSL Session ID 
  • SSL Private Certificate
  • netrc support
  • Metalink support
  • IDN support
  • Bandwidth limiting
  • Happy eyeballs
  • TFTP
  • SCP upload/download
  • SFTP upload/download
  • HTTP Proxy
  • HTTP Resume
  • HTTP Ranges
  • Follow HTTP Redirects
  • HTTP Post
  • HTTP Post Chunked
  • HTTP Put
  • Cookie support
  • HTTP 1.1
  • HTTP 2 (plain text upgrade)
  • HTTP 2 (TLS NPN)
  • HTTP persistent connections
  • HTTP Digest Auth
  • HTTP NTLM Auth
  • HTTP Negotiate Auth
  • HTTP Multipost Part
  • HTTP Deflate gzip
  • FTP resume
  • FTP ranges
  • FTP active mode
  • FTP upload
  • FTP Kerberos
  • FTP Connection re-use