How to fix “curl: command not found” Error on Debian 10

We might have come across errors like “curl: command not found” while working in the terminal. This type of error comes due to only one reason: the relevant package is not installed.

Curl is a very popular data transfer command-line utility used for downloading and uploading data from or to the server. It used various network protocols for uploading and downloading data like HTTP, HTTPS, FTP, and SFTP. In this post, we will walk through a step by and easy-to-follow guide on how to install Curl on Debian, Ubuntu, or any Debian-based Operating system. Let’s start.

Installation of Curl Utility on Debian 10

Curl can be installed from the official APT package repository of the Debian 10 Operating system.

First, update the system’s repository cache using the command given below:

$ sudo apt update

Now, upgrade the installed packages as well, using the command provided below:

$ sudo apt upgrade

After successfully updating and upgrading the system. Type the command given below to install the Curl on your Debian 10 system.

$ sudo apt install curl

The installation of Curl library will start to download, and it will be installed in a moment.

Once the Curl library is installed on your Debian 10 system. Type the command provided below to verify the installation of Curl on your Debian 10 Linux system.

$ curl

Here you can verify that the curl is successfully and easily installed. Now, you can use the Curl command to your need, and you won’t see any error.

Let’s learn a little bit more about it.

How to use Curl

Curl can be used for many purposes, but we will just go through the basic tasks like getting the source code of any website or downloading a file from the web. Let’s begin with the first thing: how to view the source code.

To view the source code of any website, simply provide the URL in front of the curl command as shown below:

$ curl

This command will print out the whole source code of the website on the terminal.

Now, let’s see how to download a file using the Curl command. Suppose we have an index.html file at some website and we want to download it. To download the index.html file, the Curl command would be like this:

$ curl -O

The index.html file will be downloaded in a couple of seconds.


This post is comprised of a solution to an error “curl: command not found”. In this post, we have learned to install Curl on the Debian 10 Operating system, and we have also learned to use it to download a file or view the source code of a website.

About the author

Shehroz Azam

A Javascript Developer & Linux enthusiast with 4 years of industrial experience and proven know-how to combine creative and usability viewpoints resulting in world-class web applications. I have experience working with Vue, React & Node.js & currently working on article writing and video creation.