How To Install and Use curl In Linux (Ubuntu, Debian, Mint, CentOS)?

curl is a command-line tool used to make HTTP, HTTPS, FTP, and related web-based requests to the remote servers. Currently, the latest version of the curl supports protocols like “dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp Features: AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSocket”.

Install For Ubuntu, Debian, Mint

curl is provided by deb based distributions like Ubuntu, Debian, Mint from the central repositories. We can install the curl with the apt and apt-get commands easily.

$ sudo apt install curl

or for apt-get command use following line.

$ sudo apt-get install curl
Install For Ubuntu, Debian, Mint

Install For Fedora, CentOS, RHEL

RPM based distributions like Fedora, CentOS or RHEL provides the curl from yum or dnf repositories. The curl command can be easily installed with the dnf and yum commands like below.

$ sudo dnf install curl

or for yum command

$ sudo yum install curl

Display curl Command Version

In every version new features are added into the curl command. In order to check if a specific features or protocol is supported for the currently installed curl the version information can be displayed. The -V or --version options can be used to list current version and supported protocols.

$ curl -V

or for long format option

$ curl --version
Display curl Command Version

Download a File with curl

Even curl is a complete and advanced tool for different web-based protocols it can be also used simply by providing the remote file we want to download.

$ wget
Download a File with curl

Leave a Comment