How to install and use the curl on CentOS 8

curl is used to transfer data from a remote server or data transmission to a remote server powerful command-line tool. Using curl may use various network protocols (e.g., HTTP, HTTPS, SCP, SFTP, and FTP) download or upload data.

How to install and use the curl on CentOS 8

This article provides instructions on how to install and use the curl command on CentOS 8's.

Install curl on CentOS

Standard CentOS 8 repository provides Curl packages. To install it, run the following command:

How to install and use the curl on CentOS 8

After installation, curl verified by typing in the terminal:

The output should be as follows:

curl: try 'curl --help' or 'curl --manual' for more information

How to install and use the curl on CentOS 8

Use curl

When used without any options, curl given source URL printed to standard output:

How to install and use the curl on CentOS 8

To download a file with curl, use the -O or -o options, and then use the URL to a file.

Lowercase -o option allows you to specify the name of the saved file:

How to install and use the curl on CentOS 8

-O capital letters use the original file name to save the file:

How to install and use the curl on CentOS 8

When used with the -I option, curl will be displayed to the HTTP headers for a given URL:

How to install and use the curl on CentOS 8

Use curl, you can also download files from FTP server password-protected:

to sum up

curl is a versatile tool that allows you to send and receive data over the network.

If you have any questions or feedback, please feel free to comment.

Guess you like

Origin www.linuxidc.com/Linux/2020-02/162317.htm