RSS Subscription
Linux Howtos & Tutorials

Enter your email:

Delivered by


NOTE:New tutorials are from LinuxCareer.com

Poll

Do you own or wish to have iPhone?
 


Linux eBooks FREE Download
A guide to programming Linux kernel modules
Introduction to Linux - A Hands on Guide
A Newbie's Getting Started Guide to Linux

Linux from Scratch - Create Your Own Linux System - Free eBook

Linux: The Hacking Solution (v.3.0)

SQLite 3 with PHP Essential Training – Free Video Training Tutorials

This guide will introduce you to the world of GNU/Linux

The GNU/Linux Advanced Administration

A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)

Advanced Bash-Scripting Guide

Set up, maintain, and secure a small office email server

Partner Linux Sites:
How-To.LinuxCareer.com
Jobs.LinuxCareer.com
TuxMachines
Monsterb
LinuxBloggers
AdamsInfo
LinuxScrew
All For Linux

aria2 - all in one command line download tool

Article Index
1. Aria2 basic download
2. Download from more sources
3. Torrent download
4. Download using metalink
5. Download via torrent magnet
6. Configuring aria2
7. Conclusion

Many of as are using wget as a quick command line download tool to fetch data from the web using HTTP, HTTPS, and FTP. We usually pick download mirror closest to our location in hope for better download speed, start wget and hoping for the best. Aria2 download tool offers an alternative solution to wget with increased potential for greater download speed by downloading from more than one source in the single session.

Along the usual protocols supported by wget aria2 also offers download resume and additional download options using torrents, magnet URIs and metalinks. This article explores some aria2 download techniques which potentially could ease wget's work load.

Aria2 installation

First if you have not done so yet install aria2 package from your system’s repository such us:

Fedora:

# yum install aria2

Ubuntu:

# apt-get install aria2

You can also install  aria2 from a source code downloaded from aria2 home page.

1. Aria2 basic download

Same as it is with wget aria2 also offers one argument command line download. Lets try download such us:

$ aria2c ftp://local1/linux-distro.iso

If disconnected, you may resume download with the same command. Aria2 keeps a log file of the download progress and will reopen it when download resume is required.

2. Download from more sources

To speed up your download you can supply aria2 with more than one source of the same file:

$ aria2c ftp://local1/linux-distro.iso http://local2/linux-distro.iso

In this case aria2 will recognize that the file to be downloaded is same and will split the file into two parts as well as split the download to fetch from two sources and thus utilizing your download bandwidth to the maximum. In case you have provided two different files aria2 will download them both.

3. Torrent download

Downloading data using torrents is simple as downloading data via http or ftp. If you alredy have a torrent file which you want to use to fetch your data, simply suppy it to aria2 as a command line argument:

$ aria2c linux-dist.torrent

With aria2 you do not even have to bother to download torrent file itself, instead simply supply torrent URL:

$ aria2c http://local/linux-dist.torrent

In this case aria2 will download the torrent file to your download directory and then start downloading data. If you do not wish aria2 to download a torrent file simplyt use --follow-torrent=mem option :

$ aria2c --follow-torrent=mem http://local/linux-dist.torrent

In this case the actual torrent file will be stored into a memory only, and discarded when download is finished.

4. Download using metalink

Metalink is a file which contains all possible sources for data to be downloaded. Which means that instead supplying aria2 with a multiple sources we need to supply just a single metalink URL or metalink file. For example, you can download Ubuntu TLS Linux ISO using metalink:

aria2c http://releases.ubuntu.com/releases/10.04/ubuntu-10.04-desktop-i386.metalink

5. Download via torrent magnet

As you may have already guessed the syntax to download via torrent magnets is the same as it was in previous examples. All what needs to be done is to supply aria2 with a magnet link:

aria2c magnet:?xt=urn:btih:1e99d95f1764644a86a8e99bfd80c ...

6. Configuring aria2

If you find yourself using same aria2 options all over again, to save your time you may create a configuration file and list all aria2 options you wish to supply on the command line. To do that open or create aria2 configuration file ~/.aria2/aria2.conf andadd:

enable-xml-rpc
follow-torrent=mem
seed-ratio=2

7. Conclusion

Aria2 has much more to offer than it is described in this guide. It should not be considered as a wget replacement but rather as a alternative with more download options and support ofr IPv6.

Share this linux post:

Submit aria2 - all in one command line download tool in Delicious Submit aria2 - all in one command line download tool in Digg Submit aria2 - all in one command line download tool in FaceBook Submit aria2 - all in one command line download tool in Google Bookmarks Submit aria2 - all in one command line download tool in Stumbleupon Submit aria2 - all in one command line download tool in Technorati Submit aria2 - all in one command line download tool in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.


Linux eBooks FREE Download