
To download multiple files, enter the command in the following syntax: $ curl -O -O This is helpful when the remote URL doesn’t contain the file name in the URL as shown in the example below. If you want to download the file and save it in a different name than the name of the file in the remote server, use -o (lower-case o) as shown below.

Both work the same.ĭownload and save the file with a different name Instead of -O, you can also specify, “–remote-name” as shown below. To save the file with the same name as the original source file on the remote server, use –O (uppercase O) followed by curl as below: $ curl –O Download and save the file using the source file name Once the installation is complete, enter the below command to download a file. When prompted for a password, enter sudo password. Then enter the below command to install curl with sudo. Launch command line application in Ubuntu that is Terminal by pressing the Ctrl+Alt+T key combinations. To get started with, first, you need to install the curl. It supports pause and resumes functions as well. using Curl, you can download any remote files. It supports many protocols including HTTP, HTTPS, FTP, TFTP, TELNET, SCP, etc. Download files using CurlĬurl can be used to transfer data over a number of protocols. But the same commands will work on other Linux distributions like Debian, Gentoo, and CentOS too. For this article, I am using Ubuntu for describing the procedure.

There are normally two known ways to do this, that is using wget and curl utility. So today, I will show you how you can download a file using the command line in Linux. you can simply and quickly perform this task using the command line terminal. In addition, it utilizes fewer resources than GUI.ĭownloading files is a routine task that is normally performed every day that can include file types like ZIP, TAR, ISO, PNG, etc. Using the command line, it is easier to automate the tasks using one line. A number of people prefer to use the command line over GUI because it is easier and quicker to use than GUI. Linux Command line offers more flexibility and control than GUI.
