Aria2 Split File Download Syntax for Ubuntu Linux
This article provides a concise guide on using aria2 to split large files into multiple segments during download on Ubuntu. It covers the specific command-line syntax required to enable parallel connections and manage split sizes. Readers will learn the essential flags needed to optimize download speeds and configure aria2 for efficient file retrieval.
Install Aria2 on Ubuntu
Before configuring download segments, ensure aria2 is installed on your system. Open your terminal and run the following command to install the package from the default repository:
sudo apt update
sudo apt install aria2The Core Syntax
To split a file into segments during download, you primarily need two
flags: -x to specify the number of connections and
-k to define the minimum split size. The basic syntax
structure is as follows:
aria2c -x [connections] -k [size] [URL]Understanding the Flags
-xor--max-connection-per-server: Sets the maximum number of connections to use for each server. For example,-x 16allows 16 simultaneous connections.-kor--min-split-size: Defines the minimum size of a segment. Aria2 will split the file into chunks based on this size. For example,-k 1Msets the minimum split size to 1 megabyte.-sor--split: Specifies the number of segments to split the file into. This is often used in conjunction with-x.
Practical Example
To download a large ISO file using 16 connections with a minimum split size of 1 megabyte, use the following command:
aria2c -x 16 -k 1M -s 16 https://example.com/large-file.isoThis command instructs aria2 to establish up to 16 connections and split the file into segments of at least 1MB each, maximizing bandwidth utilization.
Permanent Configuration
If you prefer not to type these flags every time, you can add them to
your aria2 configuration file. Create or edit the file at
~/.aria2/aria2.conf and add the following lines:
max-connection-per-server=16
min-split-size=1M
split=16
Once saved, aria2 will automatically apply these settings to all future downloads without requiring explicit command-line arguments.