aria2 is a utility for downloading files.
The supported protocols are HTTP(S), FTP,
BitTorrent
(DHT,
PEX,
MSE/PE),
and Metalink.
It can download one or more files individually or from multiple
sources/protocols at the same time and tries to utilize your
maximum download bandwidth (by using multiple threads and
downloading data from HTTP(S)/FTP, while also uploading to the
BitTorrent swarm).
Using Metalink's chunk checksums, aria2 automatically validates
chunks of data while downloading a file like BitTorrent.
There are other alternative applications. But aria2 has 2 distinctive
features:
(1) aria2 can download a file from several URLs(http/ftp/BitTorrent) and
(2) If you give aria2 list of URLs,
then aria2 downloads them concurrently. You don't have to wait
for the current download queue to finish one file at a time anymore.
aria2 uses your maximum bandwidth and downloads files quickly.
There are also some applications that have the ability of segmented
downloading. Typically these applications are first split file rage
by the number of threads and download them parallel and waits
all thread finish. No re-split takes place. Normally there is no
problem for this strategy, but if one thread is very slow(i.e.
one of the server is very slow), then you have to wait for
it to finish.
aria2 can cope with this peculiar situation. aria2 can re-split
segment all the way down to 1MiB. So you don't have to worry
about the above problem. But you might complain: if slow server
is downloading last 1MiB, then you have to wait for that none the
less. The nswer is "no". In such case, aria2 cancels slow server
and use the faster server to finish download. In other words, aria2
is clever and very strong in many situations.
Unlike Aria, which has GTK+ interface,
aria2 provides command-line interface only.
But GUI-lessness brings lower resource requirement.
The physical memory usage is
typically 3MB(normal HTTP/FTP downloads) to 6MB(BitTorrent downloads).
CPU usage in BitTorrent with download speed of 1500KB/sec is around 6%.
It is being actively developed by Tatsuhiro Tsujikawa.
Feature requests and comments are all welcome. Please refer to
page.
Please visit the
project page at sourceforge.net.
This section shows some of the usage examples.
For the complete options, see aria2c(1) man
page.
Make sure that URL is quoted with single(') or double(")
quotation if it contains "&" or any characters that have
special meaning in shell.
By default, aria2 allocates files before download them to prevent
possible defragmentation of files. It is reported that it uses 50%-90%
CPU on some platforms and slows down their PCs. If you mind that, turn off
file allocation by giving --file-allocation=none to aria2.
For linux users, specifying --enable-direct-io=true makes really low CPU
intensive preallocation(around 1% CPU usage).
Basic Usage
Download a file:
aria2c http://host/image.iso
Note:
As of 0.14. 0, aria2 uses 5 connections to download 1 file by default.
To limit the number of connections to, say, just 1, use -s1 option.
Note:
To pause a download, press
Ctrl-C.
You can resume the transfer by run aria2c with the same argument
at the same directory.
You can change URLs as long as they are pointing to the same file.
Download a file using 2 connections:
aria2c -s2 http://host/image.iso http://mirror1/image.iso http://mirror2/image.iso
Note:
If you specify URLs more than the value of -s option, for this example, 2,
first 2 URLs are used and 3rd URL is used for backup, which means if one
of first2 URLs are failed then 3rd is kicked in.
Download a file from HTTP and FTP servers:
aria2c http://host1/file.zip ftp://host2/file.zip
Parallel downloads of arbitrary number of URL,metalink,torrent:
aria2c -Z http://host/file1 file2.torrent file3.metalink
Note:
If you specify only torrent or metalink file stored in your local disk,
then -Z option is not required. So you can do:
aria2c file1.torrent file2.torrent
Download files listed in a file concurrently:
aria2c -ifiles.txt -j5
Note:
-j option specifies the number of concurrent downloads.
You can include torrent and metlaink files in a list file.
Download files with remote Metalink:
aria2c http://host/file.metalink
Download files with remote Metalink; metalink file it self is processed in memory:
aria2c --follow-metalink=mem http://host/file.metalink
Download using a local metalink file:
aria2c -p -t10 --lowest-speed-limit=4000 file.metalink
Note:
To pause a download, press Ctrl-C.
You can resume the transfer by run aria2c with the same argument
at the same directory.
Download several local metalink files:
aria2c file1.metalink file2.metalink
Download only selected files using index:
aria2c --select-file=1-4,8 file.metalink
Note:
The index is printed to the console using -S option.
Download a file using a local metalink file with user preference:
aria2c --metalink-location=JP,US --metalink-version=1.1 --metalink-language=en-US file.metalink
BitTorrent Download
Download files from remote BitTorrent file:
aria2c http://site/file.torrent
Download files from remote BitTorrent file; torrent file it self is processed in memory:
aria2c --follow-torrent=mem http://site/file.torrent
Download using a local torrent file:
aria2c --max-upload-limit=40K file.torrent
Note:
--max-upload-limit specifies the max of upload rate.
Note:
To pause a download, press Ctrl-C.
You can resume the transfer by run aria2c with the same argument
at the same directory.
You can download multiple torrents.
aria2c file1.torrent file2.torrent
Enable DHT
aria2c --enable-dht http://site/file.torrent
Note:
DHT is disabled by default.
You have to give --enable-dht option to aria2c to enable DHT.
Accept only obfuscation handshake
aria2c --bt-require-crypto=true http://site/file.torrent
Download only selected files using index (usually called "selectable download"):
aria2c --select-file=1-4,8 file.torrent
Note:
The index is printed to the console using -S option.
Change the listening port for incoming peer:
aria2c --listen-port=6881-6883 file.torrent
Note:
Make sure that the specified ports are open for incoming/outgoing TCP
traffic.
Specify the condition to stop program after torrent download finished:
aria2c --seed-time=120 --seed-ratio=1.0 file.torrent
Note:
In the above example, the program exists when the 120 minutes has elapsed
since download completed or seed ratio reaches 1.0.
Throttle upload speed:
aria2c --max-upload-limit=100K file.torrent
Seeding already downloaded file:
You can seed downloaded file using --check-integrity=true option.
aria2c --check-integrity=true -d/path/to/dir file.torrent
If you are sure the file is correct, then use --bt-seed-unverified option
to skip hash check before seeding.
aria2c --bt-seed-unverified -d/path/to/dir file.torrent
You can seed multiple torrents.
aria2c --bt-seed-unverified -d/path/to/dir file1.torrent file2.torrent
Advanced HTTP Features
Load cookies:
Load Mozilla/Firefox(1.x/2.x) and Netscape format
aria2c --load-cookies=cookies.txt http://AAA.BBB.CCC/file.zip
Load Firefox3 format
aria2c --load-cookies=cookies.sqlite http://AAA.BBB.CCC/file.zip
Note:
You can use Firefox/Mozilla's cookie file without modification.
Resume download started by web browsers or another programs:
aria2c -c -s2 http://host/partiallydownloadedfile.zip
Other Advanced Features
Throttle download speed:
aria2c --max-download-limit=100K http://host/file
Repair a damaged download using --check-integrity option:
aria2c --check-integrity=true file.metalink
Note:
This option is only available used with BitTorrent or metalink with chunk
checksums.
Drop connection if download speed is lower than specified value:
aria2c --lowest-speed-limit=10K file.metalink
Parameterized URI support:
You can specify set of parts:
aria2c -P http://{host1,host2,host3}/file.iso
You can specify numeric sequence using []:
aria2c -Z -P http://host/image[000-100].png
Note:
-Z option is required if the all URIs don't point to the same
file, such as the above example.
You can specify step counter:
aria2c -Z -P http://host/image[A-Z:2].png
Time-stamping
aria2 gets timestamp of a file from the remote server and apply it to the
local file.
aria2c- -R http://host/file.iso