Commands.page Logo

Aria2 Download Multiple Sources Simultaneously Flag

This article provides a concise guide for Ubuntu users on how to configure aria2 for accelerated downloading. It identifies the specific command-line flag required to enable simultaneous connections and offers clear examples of how to implement this feature within the Linux terminal environment.

The Primary Flag for Simultaneous Connections

The flag that allows aria2 to download a file using multiple connections simultaneously is -x. This option sets the maximum number of connections per server. To effectively split the file and download these segments in parallel, it is commonly used alongside the -s flag, which defines the number of splits.

The long-form version of the flag is --max-connection-per-server. Using these flags enables aria2 to maximize bandwidth usage by establishing several connections to the download server at once.

Usage Example on Ubuntu

To download a file using 16 simultaneous connections split into 16 pieces, open your terminal and run the following command:

aria2c -x 16 -s 16 https://example.com/file.zip

In this command, -x 16 permits up to 16 connections, and -s 16 ensures the file is divided into 16 segments. Adjust the numbers based on your network stability and server limits.

Installing Aria2 on Ubuntu

If aria2 is not currently installed on your Ubuntu system, you can install it using the Advanced Package Tool. Run the following commands in your terminal:

sudo apt update
sudo apt install aria2

Once installed, you can immediately utilize the -x flag to accelerate your downloads from compatible servers.