How to Install and Use aria2 on Linux for Fast Multi-Connection Downloads

Standard command-line download utilities such as curl and wget fetch files through a single, linear TCP connection. When downloading large ISO images, machine learning checkpoints, or remote archive files, standard single-threaded transfers underutilise available network bandwidth. aria2 (invoked as aria2c) is a lightweight, multi-protocol download accelerator for Linux that splits files into segments and downloads them concurrently across multiple connections and servers.

This tutorial explains how to install aria2 on Linux, accelerate downloads with multi-connection segmentation, configure HTTP proxies and custom authentication headers, download files from BitTorrent and Metalink sources, and manage background RPC download daemons.

Installing aria2 on Linux Distributions

aria2 is available in official package repositories across all major Linux distributions.

Method 1: Installing via Native Package Managers

On Ubuntu, Debian, and Linux Mint:

sudo apt update && sudo apt install aria2 -y

On Fedora and RHEL-based systems:

sudo dnf install aria2 -y

On Arch Linux and Manjaro:

sudo pacman -S aria2

Confirm the installation and verify the supported feature flags:

aria2c --version

Accelerating Downloads with Multi-Connection Transfers

The core advantage of aria2 is its ability to establish multiple simultaneous TCP socket connections to a single server, bypassing single-thread network throttles.

aria2c -x 16 -s 16 -k 1M https://releases.ubuntu.com/24.04/ubuntu-24.04-desktop-amd64.iso
Flag / Option Value Syntax Operational Function
-x <number> -x 16 Maximum number of connections per server (default is 1; maximum supported is 16).
-s <number> -s 16 Splits the download into multiple chunks downloaded simultaneously.
-k <size> -k 1M Minimum chunk split size (ensures small files are not split into inefficient fragments).
-c -c Continues an interrupted or partially completed download (resume support).
-o <filename> -o custom-name.iso Saves the transferred payload under a specific local destination filename.

Bandwidth Tip: Throttling Download Speed

To avoid starving other office workstations or background services of network bandwidth, apply a global download speed cap using --max-download-limit=5M (e.g. aria2c --max-download-limit=5M https://example.com/archive.tar.gz).

Batch Downloading from a URL List

If you need to fetch dozens of assets in parallel, compile their URLs into a plaintext file (e.g. urls.txt) with one link per line:

aria2c -i urls.txt -j 4

The -j 4 flag instructs aria2 to download up to four different files concurrently while applying segmented connections to each individual file.

Downloading BitTorrent Files and Magnet Links

Unlike standard command-line tools, aria2 natively parses .torrent files and raw Magnet URLs without requiring an external desktop client:

# Download via local torrent file
aria2c /path/to/linux-mint.torrent

# Download via Magnet URI (wrap URL in quotes)
aria2c "magnet:?xt=urn:btih:d62a3f9e...&dn=Ubuntu"

You can set seed ratios and upload limits to preserve upstream bandwidth:

aria2c --seed-time=0 --max-upload-limit=50K "magnet:?xt=urn:btih:..."

Running aria2 as a Background RPC Daemon

Power users frequently deploy aria2 on remote servers or NAS appliances as a headless daemon controlled via web interfaces (like AriaNg or WebUI-Aria2):

aria2c --enable-rpc --rpc-listen-all --rpc-secret="my-secure-token" -D

The --enable-rpc flag spins up a JSON-RPC listener on port 6800, while -D forks the process into the background. You can then connect third-party browser extensions or mobile apps to queue remote downloads effortlessly.

Troubleshooting Common aria2 Issues

If downloads fail to initialise or throw network errors, verify these standard scenarios:

  • Server Does Not Support Byte Ranges: If aria2 issues a warning stating that the server does not support partial content ranges, multi-connection splitting is automatically disabled, and aria2 falls back to a single linear connection.
  • File Allocation Stalls: By default on Linux, aria2 pre-allocates file space on disk before writing data to prevent fragmentation. On slow filesystems or network shares, this can cause a multi-minute delay. Use --file-allocation=falloc (or none) to bypass slow pre-allocation:
    aria2c --file-allocation=falloc -x 16 https://example.com/huge-file.img
  • SSL/TLS Certificate Verification Errors: When connecting to servers with internal enterprise self-signed certificates, pass --check-certificate=false to bypass certificate validation.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.