How to Install and Use Curl on Ubuntu 20.04
twist is an order line utility for moving information from or to a far off worker. With twist, you can download or transfer information utilizing one of the upheld conventions, including HTTP, HTTPS, SCP , SFTP , and FTP .
This article discloses how to introduce Curl on Ubuntu 20.04.
Installing Curl on Ubuntu
On the off chance that you get a blunder message saying twist order not found when attempting to download a document with twist, it implies that the twist bundle isn't introduced on your Ubuntu machine.
Also Read:-How to Create a React Application and Deploy It on GitHub Pages
twist is remembered for the default Ubuntu 20.04 vaults. The establishment is quite direct:
sudo apt update
sudo apt install curl
When the establishment is finished, check it by composing twist in your terminal:
curl
The yield will look something like this:
curl: try 'curl --help' or 'curl --manual' for more information
That is it! You have effectively introduced twist on your Ubuntu machine, and you can begin utilizing it.
Using curl
At the point when utilized with no alternative, twist prints the source code of the URL determined as a contention to the standard yield.
Also Read:-How to Write SubQuery in CodeIgniter Active Record
For instance, the accompanying order will print the wellspring of the gnu.org landing page in your terminal window:
curl https://gnu.org
To download a document with twist, use either the - o or - O alternatives.
The lowercase - o choice permits you to indicate the name of the spared record:
curl -o linux.tar.xz https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.0.5.tar.xz
When summoned with capitalized - O, twist spares the record with its unique filename:
curl -O https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.0.5.tar.xz
Also Read:-CodeIgniter Get Current URL & Base URL
With twist you can likewise bring just the HTTP headers of the predetermined URL:
curl -I https://www.gnu.org/
HTTP/1.1 200 OK
Date: Mon, 29 Jun 2020 07:10:35 GMT
Server: Apache/2.4.7
Content-Location: home.html
Vary: negotiate,accept-language,Accept-Encoding
TCN: choice
Strict-Transport-Security: max-age=63072000
Access-Control-Allow-Origin: (null)
Accept-Ranges: bytes
Cache-Control: max-age=0
Expires: Mon, 29 Jun 2020 07:10:35 GMT
Content-Type: text/html
Content-Language: en
Another normal use instance of twist is to download records from secret phrase secured FTP workers:
curl -u FTP_USERNAME:FTP_PASSWORD ftp://ftp.example.com/file.tar.gz
Conclusion
Twist is an adaptable instrument that permits you to send and get information over the organization. Introducing Curl on Ubuntu is an entirely basic errand.
For more data about how to utilize this instrument, visit Curl Command Examples .
Also Read:-Convert Html To Codeigniter And Basic Steps Of Codeigniter
On the off chance that you have any inquiries or input, don't hesitate to leave a remark.