Home Terminal Tuts How to download files using command-line in Ubuntu Terminal

How to download files using command-line in Ubuntu Terminal

by Hend Adel
Published: Updated:
command-line-download-files

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.

You may also like

Leave a Comment

fl_logo_v3_footer

ENHANCE YOUR LINUX EXPERIENCE.



FOSS Linux is a leading resource for Linux enthusiasts and professionals alike. With a focus on providing the best Linux tutorials, open-source apps, news, and reviews written by team of expert authors. FOSS Linux is the go-to source for all things Linux.

Whether you’re a beginner or an experienced user, FOSS Linux has something for everyone.

Follow Us

Subscribe

©2016-2023 FOSS LINUX

A PART OF VIBRANT LEAF MEDIA COMPANY.

ALL RIGHTS RESERVED.

“Linux” is the registered trademark by Linus Torvalds in the U.S. and other countries.