Curl is a command-line tool that is used frequently by Linux users. It is a useful utility that can be used to transfer data to or from a remote server.
The curl command supports many protocols: HTTP, HTTPS, SMTP, SCP, FTP, and so on.
This tool is designed for automatic operation, it can be used without user interaction.
Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform cURL related queries on Ubuntu Linux Server.
In this context, we shall look into how to install Curl command on your Ubuntu 20.04 machine.
How to install Curl on Ubuntu 20.04 ?
To begin, ensure that you perform this procedure as the root user with sudo rights.
Then, Open the terminal and enter the following command:
If the output shows that:
Comand 'curl' not found, but can be installed with:
sudo apt install curl
Then this means that curl is not installed on your Ubuntu 20.04 machine.
You can install the curl by running:
$ sudo apt update
$ sudo apt install curl
To verify whether the curl is successfully installed, run:
$ curl --version
Working with cURL on Ubuntu ?
The most basic way to use the curl command is to run it without any option.
The curl will display the source content of the target URL.
$ curl https://linuxapt.com
If you want to download files from remote servers with the curl command, let's use the -o or -O options:
$ curl -O https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.10.11.tar.xz
To fetch only the HTTP headers, use the -I option:
$ curl -I https://linuxapt.com
To transfer files via FTP protocol, you can use the curl command with the -u option and pass the username and password as shown below:
$ curl -u Ftp-user:Ftp-password ftp://ftp.domain.com
[Need urgent assistance in fixing missing packages on Ubuntu Linux system? We are available to help you today. ]