cURL is an open-source command-line program integrated into Linux systems for a long time. It enables files to be transferred from or to a server without user interaction. In addition to HTTP, the program supports a variety of other network protocols such as FTP, FTPS, HTTPS, GOPHER, TELNET, DICT, FILE, and LDAP. It is controlled via command-line parameters that are specified when the program is called.
Furthermore, since 2018 cURL is also the part of the Microsoft operating system. It is also used in cars, televisions, routers, printers, smartphones, tablets, and many other devices. cURL uses the libcurl library for all functions relating to data transfer. It is often used for working with REST used -ful services, such as for the development or debugging of such services.
Well, most of the full-fledged Linux systems already come with cURL pre-installed, however, if not then we can do it manually. And here today we learn how to install cURL in Debian 11 Bullseye.
Installing Curl on Debian 11 Bullseye
If your Debian 11 or 10 server/desktop system doesn’t have this tool by default then we can use install with the help of a single command. The good thing is the packages are already available in the default base repo of Debian 11, hence simply run the below-given commands:
Run system update command
Make sure your system repository cache is up to date so that it could recognize the packages available in the system repository to install.
sudo apt update
Command to install Curl on Debian 11 or 10
Now, execute the below-given command to easily install the Curl tool on your Debian 10/11 system, easily.
sudo apt install curl
Check Curl version
Once the installation is completed, we can verify the same by running a simple command to check its version.
Example to use cURL
curl option... URL
curl -O https://mirror.internet.asn.au/pub/ubuntu/releases/20.10/ubuntu-20.10-desktop-amd64.iso
If you want the Curl to save the file with some other name then instead of Upper case -O use lowercase -o along with the name in which you want to save the file.
curl -o Ubuntu.iso https://mirror.internet.asn.au/pub/ubuntu/releases/20.10/ubuntu-20.10-desktop-amd64.iso
Options of cURL
|-v, –verbose||Provides extensive information on client-server communication.|
|–trace DATEI, –trace-ascii DATEI||Provides even more detailed information than –verbose and writes it to the specified file.|
|-T DATEI URL, –upload-file DATEI URL||Transfers the file to the specified destination.|
|Download options, work with HTTP|
|-C, –continue-at OFFSET||Continuation or resumption of a previous file transfer at the specified point.|
|-L, –location||Follows redirects (only HTTP / HTTPS)|
|-o DATEI, –output DATEI||Writes the contents of the downloaded file to the specified FILE instead of standard output|
|-r, –range||Gets only the bytes within the specified RANGE. If the server does not support this, the entire file will be downloaded.|
|-O, –remote-name||Writes the content of the downloaded file to a file with the same name.|
|-X COMMAND URL, –request COMMAND URL||Executes the specified HTTP command on the specified URL.|
|-x PROTOCOL://HOST:PORT, –proxy PROTOCOL://HOST:PORT||Uses the specified proxy. The protocol and port are optional.|
|-U USER:PASSWORD, –proxy-user USER:PASSWORD||Uses the specified proxy user. The password is optional.|
|-u USER:PASSWORD||passes access data|
All options – also for other network protocols – can be found on the cURL manpage.