How to download any file from different protocols with Aria2

Are you tired of having to juggle multiple tools to download files from various sources? If you’re wondering why no one has created a tool that can handle HTTP, HTTPS, FTP, and BitTorrent downloads, it’s about time you met aria2. Let’s see how you can use it to simplify the way you download files from the internet.

Installation

Aria2 is cross-platform compatible and is available for Windows, macOS, Linux, and even Android. You can find the installer at his GitHub page.

You can find the Android version in google play. For Linux, you should be able to find it in your repositories / software center / package manager. If you are on Ubuntu, Debian you can add it with:

Download everything with Aria2 Apt installation

Let’s download with aria2c

Linux distributions are a great way to see aria2’s versatility in action as they (usually) offer several different sources for their installation ISOs. For this tutorial, we will be using the Ubuntu installation ISO.

1. Start by visiting his download page.

Download everything with Aria2 Download UbuntuDownload everything with Aria2 Download Ubuntu

2. Click on the “see our alternative downloads” hyperlink under the “Download” button.

Download everything with Aria2 Alternative downloadsDownload everything with Aria2 Alternative downloads

3. Click on the “View all Ubuntu mirrors” link.

Download everything with Aria2 All MirrorsDownload everything with Aria2 All Mirrors

4. When you have a list of HTTPS, HTTPS, and FTP links to ISO, copy one to the clipboard and launch your preferred terminal. Type the following command:

Hit enter and aria2 will start downloading the file.

In the photo below, you can see aria2 downloading the file from an HTTPS source.

Download everything with Aria2 Download HttpsDownload everything with Aria2 Download Https

If the process is interrupted, you can resume downloading your file using the same command. What’s even better is that you can resume downloading even from other sources as long as the file remains the same.

READ:   5 of the best Windows 10 app docks

In the following image, we have discontinued our HTTPS download and replaced the source with an FTP. Aria2 picked up where it left off.

Download everything with Aria2 CV with FtpDownload everything with Aria2 CV with Ftp

Do you remember the page with the BitTorrent links that we suggest you leave open in your browser? Go back to that and click on the “Ubuntu 20.04 Desktop (64-Bit)” link to download a torrent file. For ease of use, save it in the same directory where you are testing the Ubuntu ISO download.

Let’s say you have the torrent file for the Ubuntu ISO. To use the torrent file as input, use its filename instead of a URL after aria2c, similar to the following:

Download everything with Aria2 Download Torrent with WildcardDownload everything with Aria2 Download Torrent with Wildcard

As before, and although we are using a different transfer protocol, aria2 has resumed the download.

Download everything with Aria2 Torrent CVDownload everything with Aria2 Torrent Resume

Switches to use

Aria2 comes with some useful switches that allow you to optimize the download process:

  • -c: Do not re-download the file if it already exists.
  • -i: Use TXT file with list of URLs as source – useful for downloading multiple files at one time.
  • -j: Followed by a number, and used in conjunction with an option like the previous one, it defines the number of files that aria 2 can download in parallel. If, for example, you use an input file containing 20 URLs with the switch above and use -j 3, aria 2 will start downloading three of these files in parallel. When one of them is finished, it will move on to the next one on the list.
  • -o: Allows you to set an output name for the downloaded file. Useful for, for example, reverting “21820198465.mp4” to “our_vacation_video.mp4”, without having to rename the file manually after the download is complete.
  • -x: Number of parallel connections for each download. Not to be confused with the -j switch, this splits a file into multiple pieces and downloads them over parallel connections to maximize download speed. It should be noted, however, that many file hosts place limits on allowed connections because they exhaust their resources. Traditional web servers usually allow up to eight connections in parallel, but you may find that some file servers even limit you to one connection.
READ:   Affordable remote desktop alternative to TeamViewer

No GUI?

If you are looking for a user interface for this command line tool, you should check out Persepolis, which is a GUI for Aria2

You can use these switches together and even mix different sources (like HTTP and BitTorrent) into a single file_list.txt that you use as input.

What’s your favorite way to download files from the internet? If instead you want to save a file to multiple folders, here’s a trick to do so.

Related:

Is this article useful?

!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version=’2.0′;
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,’script’,
‘https://connect.facebook.net/en_US/fbevents.js’);
fbq(‘init’, ‘400239050508508’);
fbq(‘track’, ‘PageView’);

Leave a Reply