How to download files using command-line in Ubuntu Terminal

One of the usual daily tasks is downloading files. Using the command line, you can easily carry out this task quickly.

Often we choose the Ubuntu command line in the terminal rather than its visual form because it is easier and faster to use. Also, the command line uses fewer machine resources than the graphical application, and you can easily automate tasks using a one-line command.

One of the usual daily tasks is downloading files. Using the command line, you can easily carry out this task quickly.

In this tutorial, we are going to cover the most popular commands that are used to download files from the command line or Terminal.

Downloading files using command-line

We shall discuss the following five download commands used in the Linux Terminal:

  1. rTorrent
  2. wget
  3. curl
  4. w3m
  5. elinks

rTorrent command

Step 1. To install the rTorrent package, use the following command:

sudo apt install rtorrent

Install The rTorrent Package On Ubuntu
Install The rTorrent Package On Ubuntu

Step 2. Now you check if the rtorrent has downloaded successfully.

rtorrent

After executing the previous command, a screen like the below should appear.

Check If the rTorrent Package Installed Successfully
Check If the rTorrent Package Installed Successfully

Now you can start downloading any torrent by paste the link to the torrent then press CTRL+S. To quit the rtorrent application, use the CTRL+q.

wget command

Step 1. To install the wget package, use the next command.

sudo apt install wget

Step 2. Check the wget version to ensure that it is installed successfully.

wget --version

wget Package Version
wget Package Version

Step 3. Now you can start installing any file you want to use the wget command beside the link, and it will begin downloading immediately.

wget download_file_url

Download One Single File Using wget
Download One Single File Using wget

In case you need to download multiple files using the wget command, then you need to create a new text file and write down all the files URLs that you need to download. Next, use the file name alongside with the wget command as follows:

wget -i downloadlist.txt

curl command

Step 1. To install the curl command, you use the following command.

sudo apt install curl

Install The curl Package On Ubuntu
Install The curl Package On Ubuntu

Step 2. To download a file using the curl command, you will need to write the file URL beside the curl command as follows:

curl -O download_file_url

Download One Single File Using curl
Download One Single File Using curl

In case you need to download multiple files using the curl command use command like the below one:

curl -O download_file_url_1 -O download_file_url_2

w3m command

Step 1. To install the w3m command, you can use the following command.

sudo apt install w3m

Install The w3m Package On Ubuntu
Install The w3m Package On Ubuntu

Step 2. To start browsing a URL, you can use the below command.

w3m website_url

Browse Website Using w3m On Ubuntu
Browse Website Using w3m On Ubuntu

A screen like the below should appear to you; next, you can start browsing the website and download it from it.

Browse Website Using w3m On Ubuntu 2
Browse Website Using w3m On Ubuntu

elinks command

Step 1. To download the elinks package, you can use the following command.

sudo apt install elinks

Install The elinks Package On Ubuntu
Install The elinks Package On Ubuntu

Step 2. To start browsing a website using the next command.

elinks website_url

Browse Website Using The elinks Package On Ubuntu
Browse Website Using The elinks Package On Ubuntu

A welcome screen should appear like the below one.

Welcome Screen For The elinks Application
Welcome Screen For The elinks Application

You can press OK to continue, and you can navigate to the file you need to download now.

Browse Website Using elinks On Ubuntu
Browse Website Using elinks On Ubuntu

Congratulations, you now can choose any of the methods to download your files.

Hend Adel
Hi! I'm Hend Adel, a freelancer technical geek with successful experience in Database, Linux and many other IT fields. I help to build solutions to suit business needs and creating streamlined processes. I love Linux and I'm here to share my skills via FOSS Linux! Thanks for reading my article.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

STAY CONNECTED

23,954FansLike
247FollowersFollow
16SubscribersSubscribe

LATEST ARTICLES

Create a ClamAV Antivirus Live USB drive, and how to use it

Antivirus Live CD or USB drives come in handy at times when your computer is infected with a virus and other malware. Here is how you can create a ClamAV Live USB drive to scan and remove the malware from a computer.
watching disney plus linux
Disney Plus or Disney+ is an on-demand entertainment streaming service in which you should see the content produced by Disney Studios, Star Wars, Marvel, Pixar, and National Geographic. The service was launched on the 12th of November 2019.
foss and linux
The rise of the Linux operating system, in all its various distributions, over the past few decades has catapulted the popularity of Free or Open Source Software (FOSS). Let's guide you in understanding what is FOSS, how it differs from freeware and is Linux a FOSS.