Download files easily from the Ubuntu terminal

download files from terminal

In the next article we are going to take a look at how we can download files from Ubuntu terminal. Downloading files is possibly one of the most common daily tasks for users. Some do it from the graphical interface, but others prefer to use the command line.

We often choose the command line over the visual way because it is easier and faster to use. What's more, the command line uses less machine resources than graphical applications. We will also be able to easily automate these tasks.

Download files from the command line

In the following lines we will see how download files from the terminal, using any of the following five tools available for Ubuntu. These are:

Using rTorrent

This client to download torrents It will allow users to download from the command line with low resource consumption. rTorrent It does not have a GUI, it is only available in CLI. The terminal will be the user interface.

For install rTorrent package, we will only have to open a terminal (Ctrl + Alt + T) and use the following command:

install rtorrent

sudo apt install rtorrent

Once the installation is finished, we can check if rTorrent has been installed correctly typing in the terminal:

rtorrent

After running the above command, a screen like the following should appear.

rTorrent interface

Now we can start downloading any torrent by pasting the link. To exit the rtorrent application, the key combination to use will be Ctrl + q.

Using wget

This is one free tool that allows downloading of content from web servers in a simple and fast way. Its name derives from the World Wide Web (w) and the word get (in English get). This name comes to mean: get from the WWW.

For install wget package, we will have to use the following command in the terminal (Ctrl + Alt + T):

sudo apt install wget

After the installation, we can check wget version, to make sure it was installed correctly:

wget version

wget --version

Now you can start download any file we need with the wget command next to the link, and it will start downloading immediately.

download a file with wget

In case you need download multiple files with wget command, we will have to create a new text file and inside write all the URLs of the files that we need to download. Then you just have to use the file name together with the wget command as follows:

wget -i listado-descargas.txt

Using curl

cURL is a software project consisting of a library (libcurl) and a shell (curl) oriented to file transfer. Supports protocols FTP, FTPS, HTTP, HTTPS, TFTP, SCP, SFTP, Telnet, DICT, FILE, and LDAP, among others.

For install curl command, you have to use the following command in the terminal (Ctrl + Alt + T):

cURL installation

sudo apt install curl

After the installation, to Download a file We must write the URL of this together with the curl command, as follows:

download a file with cURL

curl -O URL-del-archivo-a-descargar

In case we need download multiple files with curl command, you just have to use the command as follows:

curl -O URL-del-archivo1-a-descargar -O URL-del-archivo2-a-descargar

Using w3m

W3m is a text-based web browser. It looks a lot like Lynx and has support for tables, frames, SSL connections, and even images. Usually, makes the pages as faithful as possible.

For install w3m, we just have to open a terminal (Ctrl + Alt + T) and use the following command:

w3m installation

sudo apt install w3m

For start browsing a url, we will have to use the following command:

w3m access to ftp.mozilla

w3m URL-Web

Then we can browse the website and download what we need. We will do this by hovering over the file with the arrow keys and pressing Intro.

w3m web browsing

Using elinks

Elinks is a console web browser. Is text-based and focused for UNIX-based operating systems.

For install elinks package, we can open a terminal (Ctrl + Alt + T) and use the following command:

sudo apt install elinks

For start browsing a website, just use the following command:

elinks web access

elinks URL-del-sitio-web

A welcome screen like the one below should appear.

elinks web view

We will have to press OK to continue, and start browsing to the file that needs to be downloaded.

download file with elinks

As you can see in the previous screenshot, this browser will offer us several options about the selected file. One of them is Save, which will allow us to save the file that interests us.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.