Install latest cURL – Command Line Tool on Linux

Chưa phân loại
cURL is an open source, command line tool for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP. It supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos…), file transfer resume, proxy tunneling and a busload of other useful tricks. It’s used in command lines or scripts to transfer data. It is also used in cars, television sets, routers, printers, audio equipment, mobile phones, tablets, settop boxes, media players.

In addition to wget, curl is a primary tool in the linux guru’s tool chest when webscraping, poking around the internet or intranet, downloading files, testing applications and making web calls via a CLI tool.

Curl is actively developed by a community of developers and has its web presence at

A Quick look at some Feature Highlights of Curl:

  • config file support
  • multiple URLs in a single command line
  • range “globbing” support: [0-13], {one,two,three}
  • multiple file upload on a single command line
  • custom maximum transfer rate
  • FTP download, authentication
  • Kerberos 5 (*14)
  • active/passive using PORT, EPRT, PASV or EPSV
  • single file size information (compare to HTTP HEAD)
  • upload via http-proxy as HTTP PUT
  • download / upload resume
  • all operations can be tunneled through a http-proxy
  • customizable to retrieve file modification date
  • SCP both password and public key auth
  • SFTP both password and public key auth
  • SFTP with custom commands sent before/after the transfer
  • TELNET connection negotiation
  • custom telnet options
  • TELNET stdin/stdout I/O
  • full LDAP URL support
  • SMBv1 over TCP and SSL
  • SMB download & upload
  • SMB authentication with NTLMv1
  • SMTP authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9), Kerberos 5, (*4) and External.
  • send e-mails
  • mail auth support for trusted server-to-server relaying
  • SMTP multiple recipients
  • POP3 authentication: Clear Text, APOP and SASL
  • SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9), Kerberos 5 (*4) and External.
  • list e-mails
  • retrieve e-mails

For more features

Latest Curl Release

The latest version of curl as of Jan 2020 is 7.68.0. Downloads are posted on the curl site and the source code can be found on the github page for the project. See the Changelog for the latest curl Release Notes.

How to build and install Curl from source

First get the source code for curl from the download page. I won’t demo this because likely you need curl or wget to get the source code and that is redundant to show in this tutorial. See the downloaded software below:

Also you will need to install GCC and make on your machine before starting, let’s assume its Debian or compatible:

  $ apt-get install gcc  $ apt-get install make  

Now unpack the software with the tar command. And then enter the unpacked directory and run configure and make and make install

  $ tar xzvf curl-7.68.0.tar.gz  $ cd curl-7.68.0  $ ./configure  $ make  $ sudo make install  

If you get this warning, you may have 2 versions of curl installed and need to ensure you are using the libcurl you just compiled with the curl version you compiled. So set the LD_LIBRARY_PATH to fix it:

  WARNING: curl and libcurl versions do not match. Functionality may be affected.  $ export LD_LIBRARY_PATH=/usr/local/lib  

Now you can see curl and libcurl have matching versions and curl is working as expected.

How to install Curl on Debian 10 or Ubuntu 19.10

Curl is installed by default on Debian and Ubuntu latest versions. If you have removed it for some reason you can install it with apt-get

  sudo apt-get install curl  

How to install Curl on CentOS 8

Curl is installed by default on CentoOS and Red Hat latest versions. If you have removed it for some reason you can install it with yum

  sudo yum install curl  

Download WebPage with Curl Example

Let’s download a simple webpage with curl. Here is the syntax and example:

  curl > out.webpage  head out.webpage  

Multi-Page Download Example

You can use wildcards and fancy syntax to download many files at once. Here is an example to download from Linuxhint the sitemap pages which follow a regular pattern. The -O option will store the files in names that are the same as the original web pages but locally.

  curl -O[01-12].xml  


Curl is mostly installed on most modern Linux distributions by default so getting access to it is super easy. Compilation or package install is also easy. Check the resources below for more details on all the abundant features of curl.

More Curl Resources

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

Deploying Apps on Kubernetes Clusters

In a previous article we deployed a Kubernetes Cluster with one master and one worker node. Kubernetes clusters are mainly...

Nping and Nmap arp scan

Introduction to Nping ARP scan Nping ARP scan types Nmap ARP discovery Conclusion Related articles Introduction to Nmap...

MariaDB Dump Tutorial

Many websites are now using MariaDB server to store their valuable data. Data is the most important content of any website....
Bài Viết

Bài Viết Mới Cập Nhật

Check proxy trên trang nào chuẩn nhất❓

Thuê Proxy chạy Google Ads / Cần chú ý gì khi chọn proxy và email chạy G.G ads?

Thuê proxy 4G ở đâu uy tín, giá rẻ, chất lượng?

Vì sao cần thuê proxy xoay? Địa chỉ cung cấp proxy xoay uy tín

Thuê proxy v6 kéo view Youtube ở đâu uy tín, chất lượng?