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

24,328FansLike
190FollowersFollow

LATEST ARTICLES

RECENT COMMENTS

terminate frozen app
For dealing with a frozen app or desktop, you can't use the CTRL+ALT+DEL in Linux system. Instead, there are powerful alternatives that come in handy in frustrating situations. We pick the best methods available for you.
best video players for linux
Most Linux-based systems come with a built-in video player, but let's be honest, it most definitely won't be able to satisfy all of your requirements, due to the fact that default software is mostly made for basic purposes. In this article, we will review the 5 Best Video Players for Linux and thoroughly discuss their features as well as their pros and cons.
Test drive linux online
Enter DistroTest.net, a website that allows Linux users to test various distros online, without downloading the ISO or installing the distro. With DistroTest.net, you can check a distro with no muss, no fuss.