[email protected]Support 24/7 · Billing 09:00 – 00:00LinkedInXFacebook
NexonHost
Netherlands Dedicated ServersAmsterdam · Equinix AM6Germany Dedicated ServersFrankfurt · Equinix FR4Romania Dedicated ServersBucharest · VoxilityAustria Dedicated ServersVienna · Interxion VIEBulgaria Dedicated ServersSofia · TelepointFrance Dedicated ServersParis · Interxion PAR — Marseille · Digital Realty MRS3Ireland Dedicated ServersDublin · Equinix DB2Italy Dedicated ServersMilan · Irideos AvalonPoland Dedicated ServersWarsawSpain Dedicated ServersMadrid · Equinix MD2United States Dedicated ServersAshburn · Equinix DC
All articles
Getting startedMarch 16, 2023

How to Install and Use Curl on Debian 10

How To Install And Use Curl On Debian 10

This guide explains how to install and use the curl command on Debian 10, Buster.

If you are trying to download a file using curl and getting an error message saying curl command not found it simply means that the curl package is not installed on your Debian System.

Curl is a command-line utility for transferring data from or to a remote server. It allows you to download or upload data using HTTP, HTTPS, SCP , SFTP , and FTP protocols.

 

Installing Curl on Debian

Curl package is included in the default Debian 10 repositories, to install it run the following command:

sudo apt install curl

To verify that curl has been installed, type curl in your terminal, and press Enter:

curl

The command will print the following output:

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

That’s it! You have successfully installed curl on your Debian machine, and you can start using it.

 

Using Curl

When used without any option, curl prints the source code of the URL specified as an argument to the standard output:

curl https://example.com

To download a file with curl, use either the -o or -O flags.

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

curl -o linux.tar.xz https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.0.5.tar.xz

Uppercase -O saves the file with its original filename:

curl -O https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.0.5.tar.xz

Another useful feature of Curl is its ability to display the HTTP headers of a given URL:

curl -I https://www.debian.org/
HTTP/1.1 200 OK
Date: Mon, 09 Sep 2019 21:22:30 GMT
Server: Apache
Content-Location: index.en.html
Vary: negotiate,accept-language,Accept-Encoding,cookie
TCN: choice
X-Content-Type-Options: nosniff
X-Frame-Options: sameorigin
Referrer-Policy: no-referrer
X-Xss-Protection: 1
Strict-Transport-Security: max-age=15552000
Last-Modified: Mon, 09 Sep 2019 08:52:31 GMT
ETag: "38e4-5921ae8851520"
Accept-Ranges: bytes
Content-Length: 14564
Cache-Control: max-age=86400
Expires: Tue, 10 Sep 2019 21:22:30 GMT
X-Clacks-Overhead: GNU Terry Pratchett
Content-Type: text/html
Content-Language: en

With Curl you can also download files from FTP servers that are password protected:

curl -u FTP_USERNAME:FTP_PASSWORD ftp://ftp.example.com/file.tar.gz

 

Conclusion

Curl is a versatile tool that allows you to send and receive data over the network. Installing Curl on Debian is a pretty simple task.

Keep reading
How to Enable and Disable Root User Account in Ubuntu
May 30, 2023

How to Enable and Disable Root User Account in Ubuntu

How To Enable And Disable Root User Account In Ubuntu This tutorial explains how to enable and disable the root user account in Ubuntu Linux. As a new Ubuntu user, you may wonder how to log in to your Ubuntu system as a root user or what is the default root password. In Ubuntu Linux,…

Read article
How to Add and Delete Users on Debian 9.
May 30, 2023

How to Add and Delete Users on Debian 9.

How To Add And Delete Users On Debian 9. This tutorial explains how to add and remove users on Debian 9. Debian, as well as all other Linux distributions, is a multi-user operating system. Each user can have different permission levels and specific settings for various command-line and GUI…

Read article
How To Set or Change Timezone on Debian 9.
May 30, 2023

How To Set or Change Timezone on Debian 9.

How To Set Or Change Timezone On Debian 9. Using the correct timezone is important for many systems related tasks and processes. For example, the cron daemon uses the system’s timezone for executing cron jobs and the timestamps in the log files are based on the same system’s timezone. The system’s…

Read article
Get in Touch

Together, Let’s Build a Faster, Safer Internet.

Build scalable infrastructure with NexonHost — high-performance dedicated servers, VPS hosting, cloud hosting, and DDoS protection across Europe.

Get Started →Contact Us
[email protected]Support 24/7 · Billing 09:00 – 00:00