Aria2 - Multi-Protocol Command-Line Download Tool for Linux
Last Updated :
30 May, 2021
Aria2 is an open-source lightweight multi-protocol, multi-server & multi-source command-line utility that is used for downloading files in Windows, Linux, and Mac.
Aria2 is used to download a file at a good speed by utilizing your maximum download bandwidth from multiple sources/protocols such as HTTP(S), FTP, SFTP, Bittorrent, and Metalink. You can download a file from HTTP(S)/FTP/SFTP and BitTorrent at the same time, while the data downloaded from HTTP(S)/FTP/SFTP is uploaded to the BitTorrent swarm.
Aria2 can be used as an alternative to wget, curl or torrent clients as aria2 has few more advantages over these tools, because of greater download speed and the facility of pause and resume downloads.
Features:
- Lightweight
- Built-in JSON-RPC and XML-RPC interfaces can control the aria2 process
- Auto check of chunks of data s while downloading a file like BitTorrent using Metalink's chunk checksums
- HTTP Proxy authentication support
- Download a file from multiple sources/protocols by giving a better download experience
In this article, we are going to discuss the installation process and usage of Aria2 tool in Debian/Ubuntu-based Linux Distros.
Installation
For installing Aria2 in Debian/Ubuntu systems, use the following command to install ‘aria2’:-
$ sudo apt-get install aria2

Usage of Aria2 tool:
After you are done with installing the Aria2 tool on your system, now you need to learn how you can use this tool to download files. The following examples will help you understand how you can use this tool.
1) Download single file from the web:
If you want to download a single file using either HTTP, HTTPS, or FTP protocol, then follow the following syntax:
$ aria2c <url of the file you want to download>
If you stop the download with Ctrl + C, or it gets interrupted, then the download gets paused, and again you can resume it using the same download command.
As you can see, we resumed the download again, and it started from where it had been paused and not from the beginning.
If you want to save the downloaded file with a different name and format then you can use the -o flag using the following syntax:
$ aria2 -o <the name you want to give to the file> <url of the file you want to download >
If you want to limit the download speed of a file while your internet is slow (as by default ‘aria2’ uses the full bandwidth to download a file) you can use the –max-download-limit option using the following syntax:
$ aria2 --max-download-limit=450K <url of the file you want to download>
Here we used 450k as a limit you can use some other limit according to your wish.
2) Download Two Or Multiple Files At Once
If you want to download multiple files at once use the following syntax:-
$ aria2 <" File 1 "> <"File2"> <"File3">
3) Download Files using Multiple connections
You can download a file using more than one connection to each host by using the option -x2 (connection 2), although you can also give -x5 (connection 5). The syntax is as follows:
$ aria2 -x2 <URL of the file you want to download>
4) Download File from Bittorrent:
There are 2 ways you can download files from BitTorrent using aria2. They are as follows:
Method 1: Download a torrent file using aria2 by downloading the.torrent file to your system using the following syntax:
$ aria2c name.torrent
Method 2: By passing the link to the torrent file to aria2 using the following syntax:
$ aria2c https://example.com/filename.torrent
In this case, aria2 will first download the.torrent file to your current directory and then start downloading data, but if you do not want that aria2 to download that torrent file to your system's current directory, and directly download the file, simply use the --follow-torrent=mem option. The syntax is as follows:
$ aria2c --follow-torrent=mem <torrent file url>
5) Download File from Metalink:
Files that contain all possible sources for data to be downloaded are called Metalinks(although aria2 uses multiple sources to pull the file from metalink). To download a file from Metalink use the following syntax:
$ aria2c http://example.com/filename.metalink
6) Download URLs found in a text file:
If you want to download a list of URL’s written in a text file where the URL‘s must contain one download per line, then you can use the following command:
$ aria2c -i filename.txt
If you want to know more about the usages and available options of aria2, then have a look over the manual of the aria2 tool.
$ man aria2c
Similar Reads
Non-linear Components In electrical circuits, Non-linear Components are electronic devices that need an external power source to operate actively. Non-Linear Components are those that are changed with respect to the voltage and current. Elements that do not follow ohm's law are called Non-linear Components. Non-linear Co
11 min read
Spring Boot Tutorial Spring Boot is a Java framework that makes it easier to create and run Java applications. It simplifies the configuration and setup process, allowing developers to focus more on writing code for their applications. This Spring Boot Tutorial is a comprehensive guide that covers both basic and advance
10 min read
Class Diagram | Unified Modeling Language (UML) A UML class diagram is a visual tool that represents the structure of a system by showing its classes, attributes, methods, and the relationships between them. It helps everyone involved in a projectâlike developers and designersâunderstand how the system is organized and how its components interact
12 min read
Backpropagation in Neural Network Back Propagation is also known as "Backward Propagation of Errors" is a method used to train neural network . Its goal is to reduce the difference between the modelâs predicted output and the actual output by adjusting the weights and biases in the network.It works iteratively to adjust weights and
9 min read
3-Phase Inverter An inverter is a fundamental electrical device designed primarily for the conversion of direct current into alternating current . This versatile device , also known as a variable frequency drive , plays a vital role in a wide range of applications , including variable frequency drives and high power
13 min read
Polymorphism in Java Polymorphism in Java is one of the core concepts in object-oriented programming (OOP) that allows objects to behave differently based on their specific class type. The word polymorphism means having many forms, and it comes from the Greek words poly (many) and morph (forms), this means one entity ca
7 min read
Linux Commands Cheat Sheet Linux, often associated with being a complex operating system primarily used by developers, may not necessarily fit that description entirely. While it can initially appear challenging for beginners, once you immerse yourself in the Linux world, you may find it difficult to return to your previous W
13 min read
What is Vacuum Circuit Breaker? A vacuum circuit breaker is a type of breaker that utilizes a vacuum as the medium to extinguish electrical arcs. Within this circuit breaker, there is a vacuum interrupter that houses the stationary and mobile contacts in a permanently sealed enclosure. When the contacts are separated in a high vac
13 min read
CTE in SQL In SQL, a Common Table Expression (CTE) is an essential tool for simplifying complex queries and making them more readable. By defining temporary result sets that can be referenced multiple times, a CTE in SQL allows developers to break down complicated logic into manageable parts. CTEs help with hi
6 min read
Linux/Unix Tutorial Linux is one of the most widely used open-source operating systems. It's fast, secure, stable, and powers everything from smartphones and servers to cloud platforms and IoT devices. Linux is especially popular among developers, system administrators, and DevOps professionals.Linux is:A Unix-like OS
10 min read