Install and Use cURL on RHEL / CentOS 8

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:


Software Engineer | Ethical Hacker & Cybersecurity...

Md Obydullah is a software engineer and full stack developer specialist at Laravel, Django, Vue.js, Node.js, Android, Linux Server, and Ethichal Hacking.