The curl package is pre-installed on most Linux distributions today.
To check whether the Curl package is installed on your system, open up your console, type
curl, and press enter. If you have
curl installed, the system will print
_curl: try 'curl --help' or 'curl --manual' for more information_. Otherwise, you will see something like
_curl command not found_.
curl is not installed you can easily install it using the package manager of your distribution.
sudo apt update
sudo apt install curl
sudo yum install curl
The syntax for the
curl command is as follows:
curl [options] [URL...]
In its simplest form, when invoked without any option,
curl displays the specified resource to the standard output.
For example, to retrieve the
example.com homepage you would run:
The command will print the source code of the
example.com homepage in your terminal window.
If no protocol is specified,
curl tries to guess the protocol you want to use, and it will default to
To save the result of the
curl command, use either the
-o saves the file with a predefined filename, which in the example below is
curl -o vue-v2.6.10.js https://cdn.jsdelivr.net/npm/vue/dist/vue.js
-O saves the file with its original filename:
curl -O https://cdn.jsdelivr.net/npm/vue/dist/vue.js
Curl is a command-line utility for transferring data from or to a server designed to work without user interaction. In this tutorial, we will show you how to use the curl tool through practical examples and detailed explanations of the most common curl options.