aria2
Download files from multiple sources
TLDR
View documentation for the updated command
SYNOPSIS
aria2c [OPTIONS] [URI | FILE...]
Example: aria2c http://example.com/file.zip
Example: aria2c -s 10 -x 5 http://example.com/large.iso
Example: aria2c --input-file=downloads.txt
PARAMETERS
-s <NUM>, --split=<NUM>
Sets the number of connections to use for a download. A higher number can increase download speed from a single source. Default is 5.
-x <NUM>, --max-concurrent-downloads=<NUM>
Sets the maximum number of files to download concurrently. This limits the overall number of active downloads at any given time. Default is 1.
-c, --continue
Continues a partially downloaded file. aria2c will check the local file and resume from where it left off, if supported by the server.
-i <FILE>, --input-file=<FILE>
Reads URIs from the specified file. Each line in the file is treated as a separate download URI. Useful for batch downloads.
-d <DIR>, --dir=<DIR>
Sets the directory where downloaded files will be saved. If not specified, files are saved in the current working directory.
-o <FILE>, --out=<FILE>
Specifies the output filename for the download. This option overrides the default filename derived from the URI.
--enable-rpc[=true|false]
Enables the RPC interface, allowing aria2c to be controlled remotely via JSON-RPC or XML-RPC. Default is false.
--torrent-file=<FILE>
Specifies a local BitTorrent file to download. aria2c will act as a BitTorrent client for the given torrent.
--user-agent=<UA>
Sets the User-Agent header for HTTP/HTTPS requests. Useful for bypassing certain server restrictions.
--retry-wait=<SEC>
Sets the time in seconds to wait before retrying a failed download. Default is 0.
--log=<LEVEL>
Sets the logging level (debug, info, warn, error). Output is usually sent to stderr or a log file if --log-level is set.
DESCRIPTION
aria2c is a lightweight command-line download utility that supports various protocols including HTTP/HTTPS, FTP, SFTP, BitTorrent, and Metalink. It excels at accelerating downloads by simultaneously downloading a file from multiple sources or URIs and by splitting a file into multiple segments and downloading them concurrently from a single source. aria2c is highly resumable, resource-efficient, and can be run as a daemon with its built-in RPC interface for remote control. Its versatility makes it suitable for a wide range of downloading tasks, from simple file fetches to complex BitTorrent operations.
CAVEATS
When downloading large files with a high number of splits (--split), aria2c can consume significant network bandwidth and open many connections, which might impact other network activities or trigger network security alerts. For BitTorrent, proper firewall configuration is necessary for optimal peer connectivity. The RPC interface, if enabled, should be secured if exposed to untrusted networks.
RPC INTERFACE FOR AUTOMATION
One of aria2c's powerful features is its built-in RPC (Remote Procedure Call) interface. This allows external applications or web-based user interfaces (like aria2-webui) to control and monitor downloads programmatically, making it ideal for integration into scripts, servers, or custom download managers.
BITTORRENT AND METALINK SUPPORT
Beyond traditional HTTP/FTP downloads, aria2c functions as a full-featured BitTorrent client, supporting magnet links, DHT, PEX, and encryption. It also supports Metalink, an XML format for specifying multiple download locations and checksums, enhancing reliability and integrity of downloads.
HISTORY
aria2c was initially developed by Tatsuhiro Tsujikawa and first released in 2006. It was designed to be a fast, versatile, and resource-efficient command-line downloader. Its core strengths, such as multi-source and multi-segment downloads, along with its support for various protocols including BitTorrent and Metalink, quickly made it a popular choice for advanced users and scripts requiring robust download capabilities.
SEE ALSO
wget(1), curl(1), lftp(1), transmission-cli(1)