Knowledge Base
MilesWeb / Web Hosting FAQ

Learn to use cURL program

Approx. read time : 3 min

What is cURL?

cURL is a tool that is used to transfer data from or to a server, with the help of using one of the protocols from DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, POP3, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP.

This article will explain how to use the cURL program to transfer files from the command line.

# When to use cURL?

Whenever you want to transfer a file quickly from the command line, cURL program is the easiest way to do so. For example, if for your project you need to download a .zip file or .tar.gz file that contains a code library of your project then with the help of cURL you can download the file directly to your account, instead of using an FTP client to download and transfer the file to your account.

#Using CURL

To use cURL log in to your MilesWeb account using SSH, and then type the following command :


Still, you will have to download a page from the test domain :

curl -O

cURL will download the page to the current working directory. The -O option instructs cURL to download the output and save it in a file name that already has the same name as the source document. Here it is test.html. So if you open the test.html file on your account, you will see the HTML source page for

In case you want to download a file and assign it a specific filename, use the -o option. For example, in order to download the file to a file on the local account named download.html, you need to type the following command :

curl -o download.html

These are just the basic commands. There are more options available in cURL program and to learn them type the following command :

man curl
Also Read :
Sonam Wagh
With an interest in doing something creative daily, Sonam works as a Digital Marketing Executive. She likes to write technical blogs related to web hosting, digital marketing, and other IT topics. She also likes to spend her leisure time on social media to find different strategies for client engagement.