20+ CURL Linux Commands 2019 For Ubuntu 18.04 & All Linux Distros

Essential CURL Linux Commands


URL Command: It is a Linux Terminal Command mainly used to transfer the data from one server to another server. This CURL Command is an useful Terminal command line utility and mainly used to download and upload from to the server. In this tutorial, We added 20+ best examples to use the CURL command effectively in Linux.

The below CURL commands are tested on Ubuntu 19.04 Disco Dingo edition and Ubuntu 18.04. There are more than 20+ CURL commands are available and it will be updated in another article.

Jump To:

Best CURL Linux Commands:

Follow the below commands to test the CURL commands on Linux and its distros.

Use Basic CURL Command:

The CURL is mainly used to get the content from one server to another server. You can get the source code of any websites or server by using the CURL command.


The above command will get you the Source code of the “” in the Linux terminal. This CURL command will work as a browser in the Linux terminal. Copy the above command & replace the “” with your own URL or IP address.

Basic Linux CURL
Basic Linux CURL

Store File Using CURL:

You can simply store the output file from the above output by following the below command.

$curl > tecrobust.html

The CURL command will help you get the source code of the URL that you provided and adding the ” > tecrobust.html “, will help you store the source code under the filename of tecrobust.html in your Linux pc. You can replace the tecrobust.html with your own name and file format.

Store File using CURL
Store File using CURL

CURL -o Command Usage:

$curl -o tecrobust.html

You can use the “-o” option to download or store the data to a specific file.

Check this too  APT-GET Command Not Found! {Fixed}?Ubuntu 18.04.2 LTS, 19.04 & Debian
curl -o Command
curl -o Command

CURL -O (Capital O) Command Usage:

(Capital O) “CURL -O” will help you save the downloaded data in a file with the same name.

$curl -O

The above command “curl -O” will save the downloaded data in a file named ‘websites.html’.

CURL -O Command
CURL -O Command

Mute CURL Command Output:

If you want to make your terminal clear while processing the CURL commands and then you need to follow the below command to mute the CURL process. The below command will also mute the process of CURL Errors.

$curl -s

The above image shows that the SSL error while using the CURL command on Linux Terminal, To minimize the error just add the “-s” code with CURL. “ -s ” will minimize the error displays in the terminal.

CURL Error Mute
CURL Error Mute

As you see in the above image the error have been muted in the terminal. If you want to see the error run the same command but add the “-S” ( Capital S) with the command and execute.

$curl -s -S
To Display CURL Error
To Display CURL Error

The above image shows CURL with errors. Simply use the “-s  -S” along with CURL.

Store/Download Multiple Files From Website or Server:

By using the CURL you can able to store or download data from more than one websites. Just simply follow the below commands to enable multiple downloads using CURL command.

$curl -O -O
Multiple Download using CURL
Multiple Download using CURL

You can use the -o or -O to download multiple files using CURL.

URL 301 Redirect Using CURL:

Website nowadays having SSL encryption to maintains the user data security and so every website has HTTPS connection nowadays. Before this, website only having the port 80 connection ( HTTP ) only. If you are familiar with only HTTP connection and CURL will throw you the Redirection error instead of downloading the file.

Check this too  Grep Command in Linux: Syntax, Options & Grep Examples Commands!
CURL 301 Error
CURL 301 Error

To minimize this error, -L command line option. This command will handle your 301 redirection errors in terminal.

$curl -L

The above command will minimize the 301 error occurring on CURL action.

Minimize 301 redirection Error CURL
Minimize 301 redirection Error CURL

CURL -V Command:

You can view the full process behind the CURL operation. By simply adding the “-v” command with CURL option to view the complete process behind the CURL.

$curl -v
-v CURL Command
-v CURL Command

The above image shows that the usage of “-v” command with curl, which helps you to see the complete process behind the CURL operation.

  • * – additional information provided by the tool.
  • > – display the header data which is sent
  • < – display the header data which is received

To find more information behind the CURL process we recommend you use them --trace option.

--trace CURL Command:

The --trace option will provide you the more information behind the CURL option.

$curl --trace info
CURL - - trace Command
CURL – – trace Command

Find Word Meaning Using DICT Protocol With CURL Command:

By using this command, you can look up for a word on the terminal using dict protocol. A dictionary server URL is passed to it.

$curl dict://
Look up meaning for word using CURL
Look up meaning for a word using CURL

To search a word in a specific dictionary, use the following command:

$curl dict://

To search a word in all the dictionaries, run the following command:

$curl dict://*

Using Proxy URL to Download Data:

$curl -x download_URL

The above command will help you to download the data files from the proxy servers. “-x” informs the CURL need to use the proxy server to download data files.

Check this too  How to Install PIP for Python 2, Python 3 on Debian 10?

CURL to Limit Download Rate:

$curl --limit-rate 2048B -O file_download_URL

The above command will limit the downloading speed of data from the download URL.

 CURL to Authenticate After File Download:

$curl -u username:password download_URL

The “-u” enables the password authentication after the file has been download using CURL.

Resuming Download Using CURL:

$curl -C File_download_URL

The above command can be used when you are trying to download a large file from the server or if you have a low internet connection speed and then the above command will help you resuming the download process using CURL.

Download Files from FTP Server Using CURL:

$curl -u ftpuser:password -O ftp://ftp_pub_IPA/public/index.php

The above command will help you download the files from the FTP server. You need to provide the proper authentication username and password to download the files from FTP server.

Upload files to FTP Server using CURL:

$curl -u ftpuser:password -T index.php ftp://ftp_pub_IP/public/

The above command will help you upload the files onto the FTP server.

Verify SSL Connection using CURL:

$curl --cacert new-ca.crt File_download_URL

The above command will help you verify the SSL Certificate of download file URL.

Ignore SSL Warning using CURL:

$curl -k File_download_url

The above command will help you ignore SSL warning while using CURL for downloading the file from the server.


That’s it, The above 20+ CURL Linux Commands will help you to perform some important tasks in Linux Ubuntu. If you have any queries or need an update in this article and kindly contact us.

Article Review
  • 95%
    Command Listed - 95%
  • 99%
    Commands Working - 99%
  • 90%
    Image Explanation - 90%


For more article, kindly visit our Homepage

Leave a Reply

Your email address will not be published. Required fields are marked *

Written by Mike

Seeker of nature. For me, everything is about nature. Loves to gaze through different scapes, weather and admire the colors of nature. Contact me through the Contact Us adding "@Mike" on the Subject box.

Install Kodi 18.2 Leia[Stable] on Linux Ubuntu 19.04/ 18.04.2 LTS


How To Install PHP-7.2 CURL On Ubuntu 18.04, 18.04.2 & 19.04 Edition