• Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate
TecNStuff
Menu
  • Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate

How to Install and Use Curl on Debian 10 Linux

Written by Admin, Updated On January 6, 2020
curl, debian
How to Install and Use Curl on Debian 10 Linux

Curl utility is used for transfer data from or to a server using one of the supported protocols including HTTP, HTTPS, SCP, SFTP, and FTP. It can also be use to download or upload files with supported options like proxy support, resume transfer and much more. This article explains how to install curl on Debian 10 Buster.

The wget command is alternative way of curl to transfer the files. If you are trying to use curl command and get error message like bash: curl: command not found it means that the curl package is not installed on your Debian System.

Step 1 – Install Curl on Debian#

By default, Debian 10 repositories includes Curl package. Run the below command to install curl as root or user with sudo privileges:

sudo apt install curl

Step 2 – Verify Installation#

You can verify that curl is installed successfully by typing curl in your terminal:

curl

It should show output as below:

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

That’s it! You have successfully installed curl on your Debian system, and you can use it.

Step 3 – Use Curl#

If you would like to view source code of any url simply follow url by curl command and hit Enter key:

curl https://google.com/

You can download file using -o or -O flags with curl command. By using lowercase -o option you can specify the name of the saved file as given below:

curl -o test_file.iso https://example.com/abc.tar.xz

Option -O (uppercase) will be used to store file with its original name:

curl -O https://example.com/abc.tar.xz

Using curl you can see the headers of any given URL. For example, if you want to show headers of https://www.google.com/ run below command:

curl -I https://www.google.com/

It will show output as following:

HTTP/1.1 200 OK
 Date: Mon, 06 Jan 2020 06:08:48 GMT
 Expires: -1
 Cache-Control: private, max-age=0
 Content-Type: text/html; charset=ISO-8859-1
 P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info."
 Server: gws
 X-XSS-Protection: 0
 X-Frame-Options: SAMEORIGIN
 Set-Cookie: 1P_JAR=2020-01-06-06; expires=Wed, 05-Feb-2020 06:08:48 GMT; path=/; domain=.google.com
 Set-Cookie: NID=195=KBv5W-rqZBmsjmBmXTM4x6zg8_zy3_4lZZPOLu1kk6c2n0xpqkLTK-Sb2VB7AX6UjRjKZaSGb8XX6gS07AcFJbFXUtVrJG3If1gbnamWeOZBcECySpzrST_GKU3HvEWWX0tBBruEE8jZvarSp59iUSa0wkRqxrgtsv8vIAJjLHw; expires=Tue, 07-Jul-2020 06:08:48 GMT; path=/; domain=.google.com; HttpOnly
 Transfer-Encoding: chunked
 Alt-Svc: quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000
 Accept-Ranges: none
 Vary: Accept-Encoding

To get more help for curl command type man command:

man curl

OR

curl --help

Conclusion#

Install Curl on Debian 10 is a pretty simple task. For more information about how to use this tool, visit Curl Command Examples.

If you have any questions or suggestion, feel free to leave comment below.

If our content helps you, please consider buying us a coffee

Thank you for your support.

Share On
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
 Previous Article How to Install Slack on Debian 10 Linux
Next Article   How to Install GCC Compiler on Debian 10 Linux

Related Posts

  • How to Install and Configure Fail2ban on Debian 10

    How to Install and Configure Fail2ban on Debian 10

    June 6, 2021
  • How to Install LibreOffice 7.0 on Debian 10

    How to Install LibreOffice 7.0 on Debian 10

    January 25, 2021
  • How to Install AnyDesk on Debian 10

    How to Install AnyDesk on Debian 10 Buster

    January 23, 2021

Leave a Reply Cancel reply

DigitalOcean Referral Badge

Popular Posts

© 2020 TecNStuff All rights reserved. This website is using and storing cookies on your browser. By using this website you agree our Privacy Policy.  Follow us -  Twitter | Facebook