Categories: Ubuntu

How to Install CURL in Ubuntu 22.04

For Linux-based systems such as Ubuntu 22.04, “CURL” is a command-line utility that is used for automating the process of data transfer to or from a web server. It behaves as the backbone for extensive web-based software that is used by millions of people. This lightweight tool permits you to download the information, perform detailed analyses and sort out data on its base.

This write-up will discuss the procedure to install CURL in Ubuntu 22.04. So, let’s start!

How to Install CURL in Ubuntu 22.04

To install CURL in Ubuntu 22.04, you must follow the below-given step-by-step instructions.

Step 1: Update system repositories
Press

Sponsored
CTRL+ALT+T” to open the terminal of the Ubuntu 22.04 and run the below-given command to update system repositories:
$ sudo apt update

Step 2: Install CURL in Ubuntu 22.04
After updating the Ubuntu 22.04 system repositories, execute the following command for CURL installation:

$ sudo apt install curl

The given error-free output signifies that CURL is now successfully installed on our Ubuntu 22.04 system:

Step 3: Verify CURL installation
As soon as, CURL installation gets complete, you can verify its existence by typing out “curl” in Ubuntu 22.04 terminal:

$ curl

If the execution of the above-given command print out the following output that it indicates that now CURL is all ready to use on your system:

How to use CURL in Ubuntu 22.04

CURL can be utilized in different scenarios for transferring data over network protocols.

Sponsored

For instance, in the following “curl” command, we have not added any “option”, so it will print out the “gnu.org” homepage source in Ubuntu 22.04 terminal:

$ curl https://gnu.org

Want to download a file? If yes, then use the “curl” command with the “-o” or “-O” and specify the name according to which the downloaded file will be saved:

$ curl -o linux.tar.xz https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.0.5.tar.xz

In the other case, when “-O” option is added in the “curl” command, the downloaded file is saved with its original name:

$ curl -O https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.0.5.tar.xz

You can also utilize CURL for retrieving the “HTTP” headers of the specified URL:

$ curl -I https://www.gnu.org/

Here is the output of the above-given command:

We have compiled the method to install and use CURL in Ubuntu 22.04. Give it a try and transfer files to or from a selected server efficiently.

Conclusion

To install CURL in Ubuntu 22.04, first, update the system repositories by utilizing the “$ sudo apt update” command then execute the “$ sudo apt install curl” command for CURL installation. After doing so, you can use CURL for transferring files from or to servers, fetching web page sources, or the header of a specific URL. This write-up discussed the method to install CURL on Ubuntu 22.04.

Ubuntu Server Admin

Recent Posts

How to Fix VMware’s “Could not open /dev/vmmon” Error on Ubuntu

You’ve recently installed VMware Workstation on your Ubuntu system and encountered the frustrating “Could not…

27 minutes ago

How to Fix Ubuntu 404 Errors While Fetching Dependencies

Have you ever found yourself staring at a terminal full of 404 errors while trying…

27 minutes ago

How to Fix ‘Please Install All Available Updates’ Error When Upgrading Ubuntu 18.04 to 20.04 LTS

One particularly frustrating error that many users face when trying to upgrade from Ubuntu 18.04 …

27 minutes ago

How to fix “Release is not valid yet” Error in Docker Containers

In the world of containerization, time synchronization issues can create unexpected roadblocks when working with…

28 minutes ago

How to fix “Externally Managed Environment” Pip Errors on Ubuntu

If you’ve recently upgraded to Ubuntu 23.04 or newer, you might have encountered a frustrating…

28 minutes ago

Ubuntu now officially supports NVIDIA Jetson: powering the future of AI at the edge

Canonical announces the General Availability of Ubuntu for the NVIDIA® Jetson Orin™ for edge AI…

7 hours ago