Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • Shell Scripting
  • Kali Linux
  • Ubuntu
  • Red Hat
  • CentOS
  • Docker in Linux
  • Kubernetes in Linux
  • Linux interview question
  • Python
  • R
  • Java
  • C
  • C++
  • JavaScript
  • DSA
Open In App
Next Article:
Progress - Tool to monitor progress of basic command in Linux
Next article icon

Aria2 - Multi-Protocol Command-Line Download Tool for Linux

Last Updated : 30 May, 2021
Comments
Improve
Suggest changes
Like Article
Like
Report

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:

  1. Lightweight
  2. Built-in JSON-RPC and XML-RPC interfaces can control the aria2 process
  3. Auto check of chunks of data s while downloading a file like BitTorrent using Metalink's chunk checksums
  4. HTTP Proxy authentication support
  5. 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
Aria2 A Multi-Protocol Command-Line Download Tool for Linux

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
Aria2 A Multi-Protocol Command-Line Download Tool for Linux

Next Article
Progress - Tool to monitor progress of basic command in Linux
author
tithimukherjee
Improve
Article Tags :
  • Linux-Unix
  • Linux-Tools

Similar Reads

  • How to Install NuGet from Command Line on Linux?
    NuGet is the package manager for the .NET framework. It's very much useful for developers as developers can create, publish and consume packages. The package format of NuGet consists of a single ZIP file with the extension of .nupkg and which is the DLL compiled code like the package’s version numbe
    2 min read
  • Command-Line Tools and Utilities For Network Management in Linux
    If you are thinking of becoming a system administrator, or you are already a system admin, then this article is for you. As a system admin, your daily routine will include configuring, maintaining, troubleshooting, monitoring, securing networks, and managing servers within data centers. Network conf
    8 min read
  • How to download an image from a URL in Python
    Downloading content from its URL is a common task that Web Scrapers or online trackers perform. These URLs or Uniform Resource Locators can contain the web address (or local address) of a webpage, website, image, text document, container files, and many other online resources. It is quite easy to do
    3 min read
  • Progress - Tool to monitor progress of basic command in Linux
    Progress is a command-line-based tiny tool which is formerly known as a Coreutils Progress Viewer. This tool is written in the C language. This command looks for the Coreutils basic command like cp, mv, dd, tar, gzip, cat, etc. which are currently running on the system and display the percentage of
    2 min read
  • Manage Network Connections From the Linux Command Line with nmcli
    Network connectivity is a critical aspect of modern computing, and Linux provides a robust command-line tool for managing network connections: nmcli. Network Manager Command-Line Interface (nmcli) is a powerful and versatile utility that allows users to control and configure network settings directl
    5 min read
  • How to Create a Download Link in HTML?
    A download link allows users to download a specific file when they click on it. The download attribute in HTML is used to create a download link. Using the anchor tag we can create a download link in the HTML. Using the <a> Anchor TagTo create a download link in HTML, use the <a> tag wit
    1 min read
  • Automated Login For Captive Portals in Linux
    Every time you connect to a private network, may it be your college, office, school, etc. the captive portal screen appears where you have to enter your credentials provided by the organization. The idea is to automate that process so that whenever we are connected to any router in the same network,
    7 min read
  • How to download and install Katalon Studio?
    Katalon Studio is a complete web and mobile test automation tool that uses selenium and appium libraries and acts as an alternative to open-source automation frameworks. It is also known as a low-code automation tool which helps us to create and run the necessary test cases for different types of ap
    5 min read
  • Metagoofil - Tool to Extract Information from Docs, Images in Kali Linux
    The Metagoofil is an information-gathering tool. This is a free and open-source tool designed to extract all the metadata information from public documents that are available on websites. This tool uses two libraries to extract data. These are Hachoir and PdfMiner. After extracting all the data, thi
    2 min read
  • Tool-X - Hacking Tool Installer in Kali Linux
    Tool-X is a free and open-source tool written in python that is available on GitHub. Tool-X is used by security researchers and pen-testers in the early stages of reconnaissance and pen-testing. It is an installer framework for Kali Linux that has approximately 300 tools available on its menu. It wi
    2 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences