LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

aria2

Multi-protocol multi-source download utility

TLDR

Download a file
$ aria2c [https://example.com/file.zip]
copy
Download with multiple connections
$ aria2c -x 16 -s 16 [https://example.com/file.zip]
copy
Download from multiple mirror sources
$ aria2c [http://mirror1.com/file] [http://mirror2.com/file]
copy
Resume an interrupted download
$ aria2c -c [https://example.com/file.zip]
copy
Download a torrent file
$ aria2c [file.torrent]
copy
Download from a magnet link
$ aria2c "[magnet:?xt=urn:btih:...]"
copy
Download URLs from a file (one URL per line)
$ aria2c -i [urls.txt]
copy
Limit download speed
$ aria2c --max-download-limit=[500K] [https://example.com/file.zip]
copy

SYNOPSIS

aria2c [options] URL|TORRENT|METALINK ...

DESCRIPTION

aria2 is a lightweight multi-protocol download utility supporting HTTP/HTTPS, FTP, SFTP, BitTorrent, and Metalink. It can download files using multiple connections and sources simultaneously for faster speeds.The actual command is aria2c (the "c" stands for command-line). The tool is highly optimized, using minimal memory (typically 4-9 MiB) while supporting advanced features like segmented downloading, BitTorrent, and JSON-RPC remote control.

PARAMETERS

-x n, --max-connection-per-server n

Maximum connections per server (default: 1, max: 16)
-s n, --split n
Split download into n parts (default: 5)
-c, --continue
Resume a partially downloaded file
-d dir, --dir dir
Download directory
-o file, --out file
Output filename
-j n, --max-concurrent-downloads n
Maximum number of parallel downloads (default: 5)
-i file, --input-file file
Download URLs listed in file
--max-download-limit speed
Per-download speed limit (e.g., 500K, 2M)
--max-overall-download-limit speed
Overall download speed limit
--enable-rpc
Enable JSON-RPC/XML-RPC server for remote control
--seed-time minutes
BitTorrent seeding time (0 to disable seeding)
--select-file indices
Select specific files from a torrent (comma-separated indices)
--file-allocation method
File allocation method: none, prealloc, trunc, or falloc

CONFIGURATION

~/.aria2/aria2.conf

Default configuration file for setting download options, connection limits, and protocol-specific settings. One option per line without the leading --.

CAVEATS

Multiple connections may be limited or throttled by the server. BitTorrent requires proper port forwarding for best performance. The -x and -s flags should generally be used together for segmented downloads.

HISTORY

aria2 was developed by Tatsuhiro Tsujikawa, with initial release around 2006. Written in C++, it has become a popular alternative to wget and curl for its multi-connection download capability.

SEE ALSO

aria2c(1), curl(1), wget(1), transmission-cli(1)

Copied to clipboard
Kai