How to Install and Use aria2 on Linux - Server Solutions
Linux

How to Install and Use aria2 on Linux

How to Install and Use aria2 on Linux

Aria2 is a lightweight and powerful command-line download utility that supports multiple protocols, including HTTP, HTTPS, FTP, BitTorrent, and Metalink. Its versatility makes it an ideal choice for downloading files from various sources, particularly for users who prefer a terminal-based solution. This guide will walk you through the installation process and provide a comprehensive overview of its features and usage.

Installation
Installing aria2 on Linux is straightforward and can typically be done via your package manager. Below are the installation instructions for various distributions.

For Ubuntu/Debian:

Open your terminal.
Update your package list:

sudo apt update

Install aria2:

sudo apt install aria2

For Fedora:

Open your terminal.
Use the following command:

sudo dnf install aria2

For Arch Linux:

Open your terminal.
Install aria2 using Pacman:

sudo pacman -S aria2

For openSUSE:

Open your terminal.
Use the following command:

sudo zypper install aria2

Once installed, you can check the version to confirm a successful installation by running:

aria2c –version

Basic Usage
Aria2’s command-line interface allows you to perform a wide range of download tasks. Below are some of the basic commands to get you started.

Downloading a Single File To download a single file, use the following command:

aria2c

Replace with the actual link to the file you want to download. For example:

aria2c https://example.com/file.zip

Downloading Multiple Files You can also download multiple files simultaneously. Simply add the URLs separated by spaces:

aria2c https://example.com/file1.zip https://example.com/file2.zip

Using a Metalink File Aria2 supports Metalink files, which can provide multiple sources for a single file. To download from a Metalink file, use:

aria2c

Downloading via BitTorrent Aria2 can also handle BitTorrent downloads. To download a torrent file, use:

aria2c

Advanced Features
Aria2 offers several advanced features that enhance its functionality.

Download in Parallel Aria2 can split files into multiple segments and download them in parallel. This can significantly increase download speed. You can specify the number of connections using the -x option:

aria2c -x 16

This command will use 16 connections to download the file.

Resuming Interrupted Downloads If your download is interrupted, you can resume it using:

aria2c -c

The -c option tells aria2 to continue from where it left off.

Saving Downloaded Files By default, aria2 saves files in the current directory. You can specify a different directory using the -d option:

aria2c -d /path/to/directory

Using a Configuration File For users who frequently download files, creating a configuration file can save time. You can create a file named aria2.conf and specify options like:

dir=/path/to/directory

max-concurrent-downloads=5

You can then start aria2 with your configuration file:

aria2c –conf-path=/path/to/aria2.conf

For further information and advanced configurations, you can check the official documentation at Aria2 Documentation.

You can use the links below to browse us for other related articles, thank you for visiting our site

How to Install Curl on Ubuntu

How to Install Transmission on Ubuntu 20.04 – 22.04

If you would like to improve yourself in server management, you can purchase a server from our site, experiment and improve yourself in an affordable and reliable environment. I wish you good luck 🙂

Main Page

 

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button