Aria2 - awesome command line download manager

Back in my Windows days, I was very into download managers.  This was probably because we had slow Internet like dial-up and cable with speeds up to 128 kbps down / 64 kbps up in those days. So at this kind of speed, it makes more sense to use download managers, mostly because you are waiting all the time, and these managers made you feel that things moved faster even if sometimes that was not the case. Also, IE was a very dominant browser at the time, and when it crashed, you would have to re-download instead of just continue; that was the biggest reason I was using FlashGet, Go!Zilla and, of course, Download Accelerator Plus.
I am still under the impression that most of these programs were "placebo" like, just making you feel that things are moving faster.


Nowadays, download speed is rarely the issue, but sometimes we like to automate downloads. A great way to automate is by using a terminal based download manager. Aria2 has some exciting features that we can use. Basically, aria2 is a lightweight multi-protocol and multi-source command-line download manager. It has support for HTTP/HTTPS, FTP, BitTorrent, and Metalink

Many other alternatives come to mind like wget or cURL, but with aria2, you can download files from several URIs using different protocols, and also, if you give aria2 a list of files, it will download them concurrently.
aria2 download very well: aria2 cancels slow servers and uses the faster server to finish the download. In other words, it is very clever and reliable in many different situations, and it does most of the downloads in parallel.

Installation

You can download it directly from SourceForge. 
I'm using the Linux version, but there are releases of Windows and Android, but I can't say that I have tried them. There are also packages for most of the Linux distributions.

For Debian based (Ubuntu, Linux Mint):

sudo apt-get install aria2 

Arch Linux

sudo pacman -S aria2 
Fedora and yum based
sudo yum install aria2

Few simple examples 
  • Download a file

 aria2c  location-or-URL-of-file

  • Download from multiple sources

 aria2c  location1 location2 location3 ... 

  • Download torrent

 aria2c location-of-file.torrent 

  • List files in a torrent

aria2c -S location-of-file.torrent 

  • Download specific files from torrent

aria2c --select-file=1,2,3... location-of-file.torrent

index of files ( 1,2,3 ) can be  found with -S command
  • Limit speed for upload ( on torrent files, for example )

aria2c --max-upload-limit=200K location-of-file.torrent 

 
  • Limit speed for download

aria2c --max-download-limit=100K location of file

 
  • Pause and resume
To pause, just press Ctrl+C and, to resume, enter the same command at the same location. Aria2 keeps .aria2 files where it memorizes the current download progress.
  • Download using multiple connections

aria2c -j7 -x2 location-of-file  other-location-of-file...


this way, we instruct aria2c to use 7 concurrent connections with max 2 connections per server
  • Download  a list of files from URI provided in a file

aria2c -i file-with-uris.txt 
 

Links

http://sourceforge.net/projects/aria2/files/stable/


Popular Posts