How to install Curl on Ubuntu 20.04?

Overview

CURL is a command-line tool that is used to automate data transmission to or from a web server on Linux-based systems like Ubuntu 20.04. Millions of people utilize it as the foundation for large web-based software. You may download the data, conduct in-depth studies, and sort the information using this simple application.

This tutorial will explain you about how to setup and use Curl on Ubuntu 20.04.

Prerequisites

  • A machine running Ubuntu 20.04

  • A root user having sudo privileges

  • Internet connection

Get Started

Step 1: Updating system packages

  • Always be sure to update your system before downloading the latest packages. Run the following command to do it:

sudo apt update

Step 2: Install Curl on Ubuntu 20.04

  • Execute the following command to install CURL after upgrading the Ubuntu 20.04 system packages:

sudo apt install curl

Step 3: Check the CURL installation

  • Once CURL installation is finished, you may check for it with the below command:

curl

If the following output is displayed after running the above-mentioned command, that means Curl has been successfully installed on your Ubuntu computer, and you may now use it:

Using Curl on Ubuntu

Curl writes the URL's source code to standard output when it is invoked without any further options.

  • For instance, the command shown below will output the gnu.org homepage's source in the terminal window:

curl https://gnu.org
  • With curl, you can obtain the URL's HTTP headers using the following command:

curl -I https://www.gnu.org/

Conclusion

In this tutorial, we have learned how to install and use Curl on Ubuntu 20.04. You may transmit and receive data over the network using the flexible utility known as curl. It's not very difficult to install Curl on Ubuntu.

Last updated