[email protected]Support 24/7 · Billing 09:00 – 00:00LinkedInXFacebook
NexonHost
Netherlands Dedicated ServersAmsterdam · Equinix AM6Germany Dedicated ServersFrankfurt · Equinix FR4Romania Dedicated ServersBucharest · VoxilityAustria Dedicated ServersVienna · Interxion VIEBulgaria Dedicated ServersSofia · TelepointFrance Dedicated ServersParis · Interxion PAR — Marseille · Digital Realty MRS3Ireland Dedicated ServersDublin · Equinix DB2Italy Dedicated ServersMilan · Irideos AvalonPoland Dedicated ServersWarsawSpain Dedicated ServersMadrid · Equinix MD2United States Dedicated ServersAshburn · Equinix DC
All articles
Getting startedSeptember 11, 2023

How to Install and Use Curl on Ubuntu 20.04.

How To Install And Use Curl On Ubuntu 20.04.

This article explains how to install Curl on Ubuntu 20.04.

curl is a command-line utility for transferring data from or to a remote server. With curl, you can download or upload data using one of the supported protocols, including HTTP, HTTPS, SCP , SFTP , and FTP.

 

Installing Curl on Ubuntu

If you get an error message saying curl command not found when trying to download a file with curl, it means that the curl package is not installed on your Ubuntu machine.

curl is included in the default Ubuntu 20.04 repositories. The installation is pretty straightforward:

sudo apt update
sudo apt install curl

Once the installation is complete, verify it by typing curl in your terminal:

curl

The output will look something like this:

curl: try 'curl --help' or 'curl --manual' for more information

That’s it! You have successfully installed curl on your Ubuntu machine, and you can start using it.

 

Using curl

When used without any option, curl prints the source code of the URL specified as an argument to the standard output.

For example, the following command will print the source of the gnu.org homepage in your terminal window:

curl https://gnu.org

To download a file with curl, use either the -o or -O options.

The lowercase -o option allows you to specify the name of the saved file:

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

When invoked with uppercase -O, curl saves the file with its original filename:

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

With curl you can also fetch only the HTTP headers of the specified URL:

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

Another common use case of curl is to download files from password-protected FTP servers:

curl -u FTP_USERNAME:FTP_PASSWORD ftp://ftp.example.com/file.tar.gz

 

Conclusion

Curl is a versatile tool that allows you to send and receive data over the network. Installing Curl on Ubuntu is a pretty simple task.

Keep reading
How troubleshoot linux problems(server crash, out of memory). Diagnosing and Fixing Common Issues.
June 18, 2023

How troubleshoot linux problems(server crash, out of memory). Diagnosing and Fixing Common Issues.

How Troubleshoot Linux Problems (Server Crash, Out Of Memory). Diagnosing And Fixing Common Issues. When your Linux server seems to be offline or otherwise inaccessible, you should always be able to log in with the web console or through a VNC connection. Steps you need to do for troubleshooting:…

Read article
How to use df command.
June 13, 2023

How to use df command.

How To Use Df Command. In this article we will show you how to check disk space with df command. Using the df Command The general syntax for the df command is as follows: df [OPTIONS]… FILESYSTEM… When used without any argument, the df command will display information about all mounted file…

Read article
How to use watch command.
June 13, 2023

How to use watch command.

How To Use Watch Command. In this tutorial, we will introduce you to the watch command. watch is used to run any arbitrary command at regular intervals and displays the output of the command on the terminal window. The watch utility is a part of the procps (or procps-ng) package which is…

Read article
Get in Touch

Together, Let’s Build a Faster, Safer Internet.

Build scalable infrastructure with NexonHost — high-performance dedicated servers, VPS hosting, cloud hosting, and DDoS protection across Europe.

Get Started →Contact Us
[email protected]Support 24/7 · Billing 09:00 – 00:00