LinuxCommandLibrary

aria2c

Download files from the command line

TLDR

Download a specific URI to a file

$ aria2c "[url]"
copy

Download a file from a URI with a specific output name
$ aria2c [[-o|--out]] [path/to/file] "[url]"
copy

Download multiple different files in parallel
$ aria2c [[-Z|--force-sequential=true]] ["url1" "url2" ...]
copy

Download the same file from different mirrors and verify the checksum of the downloaded file
$ aria2c --checksum [sha-256]=[hash] ["url1" "url2" ...]
copy

Download the URIs listed in a file with a specific number of parallel downloads
$ aria2c [[-i|--input-file]] [path/to/file] [[-j|--max-concurrent-downloads]] [number_of_downloads]
copy

Download with multiple connections
$ aria2c [[-s|--split]] [number_of_connections] "[url]"
copy

FTP download with username and password
$ aria2c --ftp-user [username] --ftp-passwd [password] "[url]"
copy

Limit download speed in bytes/s
$ aria2c --max-download-limit [speed] "[url]"
copy

SYNOPSIS

aria2c [OPTIONS...] [URI...]

PARAMETERS

-h, --help
    Display usage and exit

-V, --version
    Print program version and exit

--conf-path=
    Load options from config file at PATH

--input-file=
    File containing URIs to download

--save-session=
    Save unfinished downloads to file for resuming

-d, --dir=


    Download directory; default current

-o, --out=
    Output file name(s)

--max-concurrent-downloads=
    Max parallel downloads; default 5

-x, --max-connection-per-server=
    Max connections per server; default 1

-s, --split=
    Split file into NUM connections; default 5

--min-split-size=
    Min size per split (e.g., 20M); default 20M

--max-downloads=
    Max active downloads

-c, --continue
    Resume incomplete downloads

--allow-overwrite=
    Overwrite files if exist; default false

--auto-file-renaming=
    Rename if file exists; default true

--checksum=
    Verify with checksum (e.g., sha1=...)

--max-download-result=
    Max results per session

--http-user=
    HTTP basic auth username

--http-passwd=
    HTTP basic auth password

--connect-timeout=
    Connection timeout in seconds

--timeout=
    I/O timeout in seconds

--bt-max-peers=
    Max BitTorrent peers; default 55

--enable-dht=
    Enable BitTorrent DHT; default true

--seed-time=
    Seed time in minutes

--enable-rpc=
    Enable JSON-RPC server

--rpc-listen-all=
    RPC listen on all addresses

--quiet=
    Suppress console output

--log=
    Log file path

--log-level=
    Log level: debug|info|notice|warn|error

DESCRIPTION

aria2c is a command-line download tool supporting HTTP/HTTPS, FTP, SFTP, BitTorrent, and Metalink. It accelerates downloads using multiple connections per server or parallel sources, resumes interrupted transfers, and handles large files efficiently.

Key strengths include low resource usage, flexible input from URIs, files, or stdin, and queue management for batch downloads. It supports advanced features like Metalink for multi-source redundancy, BitTorrent DHT/PEX, and RPC for GUI integration (e.g., with aria2 WebUI).

Configuration via command-line flags, ~/.aria2/aria2.conf, or sessions enables scripting and automation. Ideal for servers, scripts, or power users seeking control beyond basic tools like wget. Downloads can be split, throttled, and verified with checksums, making it versatile for bandwidth-limited or high-reliability scenarios.

While powerful, its extensive options require man page reference for full mastery.

CAVEATS

Extensive options can overwhelm beginners; test configs carefully. BitTorrent features may attract legal scrutiny. High connection counts increase bandwidth but risk server bans or IP blocks. No built-in GUI; use RPC for frontends.

CONFIGURATION

Default config: ~/.aria2/aria2.conf. Supports sections like [global], [http], [bt]. Use aria2c --preallocated=true --check-integrity=true for reliability.

RPC INTERFACE

Run aria2c --enable-rpc --rpc-listen-all --rpc-allow-origin-all for remote control via JSON-RPC (port 6800). Integrates with UIs like AriaNg.

EXAMPLES

aria2c https://example.com/file.zip
aria2c -d /downloads -x 16 -s 16 http://largefile
aria2c --input-file=uris.txt --save-session=session.dat
aria2c file.torrent --dir=/torrents

HISTORY

Developed by Tatsuhiro Tsujikawa starting 2006 as a BitTorrent client. Evolved into multi-protocol tool; 1.0.0 released 2010. Actively maintained on GitHub with modern protocol support, performance tweaks, and cross-platform ports.

SEE ALSO

wget(1), curl(1), axel(1), lftp(1)

Copied to clipboard