Install and Use cURL on RHEL / CentOS 8

Published on February 18, 2020 39 sec read

cURL (pronounced curl) is a tool to transfer data from or to a server. cURL uses network protocol such as HTTP, HTTPS, FTP, FTPS, GOPHER, DICT, TELNET, LDAP or FILE.

Table of Contents

  1. Install cURL
  2. Usage of cURL

Install cURL

cURL is available is on CentOS 8 repository. To install cURL, we have to run this command:

sudo dnf install curl

Now type this command to verify the cURL installation:

curl --version

Usage of cURL

We can see the source code of any website using cURL:


To see the HTTP headers of a given URL, we need to run the command like:

curl -I

We’re able to download file using cURL. By adding lowercase -o we’re able to save & rename a file. Here’s the example:

curl -o

If we want to keep the same filename, we have to use uppercase -O like this:

curl -O

We can also download using FTP password-protected file using cURL:


Monthly Newsletter

One email a month, packed with the latest tutorials, delivered straight to your inbox.
We'll never send any spam or promotional emails.

Hey, I'm Md Obydullah. I build open-source projects and write on Laravel, Linux server, modern JavaScript and more on web development.