# aria2 (Command Line Downloader) command examples
[aria2][4]is a Free, open source, lightweight multi-protocol & multi-source command-line download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink. aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces. aria2 automatically validates chunks of data while downloading a file. It can download a file from multiple sources/protocols and tries to utilize your maximum download bandwidth. By default all the Linux Distribution included aria2, so we can install easily from official repository. some of the GUI download manager using aria2 as a plugin to improve the download speed like[uget][3].
#### Aria2 Features
* HTTP/HTTPS GET support
* HTTP Proxy support
* HTTP BASIC authentication support
* HTTP Proxy authentication support
* FTP support(active, passive mode)
* FTP through HTTP proxy(GET command or tunneling)
* Segmented download
* Cookie support
* It can run as a daemon process.
* BitTorrent protocol support with fast extension.
* Selective download in multi-file torrent
* Metalink version 3.0 support(HTTP/FTP/BitTorrent).
* Limiting download/upload speed
#### 1) Install aria2 on Linux
We can easily install aria2 command line downloader to all the Linux Distribution such as Debian, Ubuntu, Mint, RHEL, CentOS, Fedora, suse, openSUSE, Arch Linux, Manjaro, Mageia, etc.. Just fire the below command to install. For CentOS, RHEL systems we need to enable[uget][2]or[RPMForge][1]repository.
```
[For Debian, Ubuntu & Mint]
$ sudo apt-get install aria2
[For CentOS, RHEL, Fedora 21 and older Systems]
# yum install aria2
[Fedora 22 and later systems]
# dnf install aria2
[For suse & openSUSE]
# zypper install wget
[Mageia]
# urpmi aria2
[For Debian, Ubuntu & Mint]
$ sudo pacman -S aria2
```
#### 2) Download Single File
The below command will download the file from given URL and stores in current directory, while downloading the file we can see the (date, time, download speed & download progress) of file.
We can save the file with different name & format while initiate downloading, using-o (lowercase)option. Here we are going to save the filename withowncloud.zip.
By default aria2 utilize full bandwidth for downloading file and we can’t use anything on server before download completion (Which will affect other service accessing bandwidth). So better use–max-download-limitoption to avoid further issue while downloading big size file.
The below command will download more then on file from the location and stores in current directory, while downloading the file we can see the (date, time, download speed & download progress) of file.
Make sure, whenever going to download big size of file (eg: ISO Images), i advise you to use-coption which will help us to resume the existing incomplete download from the state and complete as usual when we are facing any network connectivity issue or system problems. Otherwise when you are download again, it will initiate the fresh download and store to different file name (append .1 to the filename automatically). Note: If any interrupt happen, aria2 save file with.aria2extension.
Alternatively wget can get the list of input URL’s from file and start downloading. We need to create a file and store each URL in separate line. Add-ioption with aria2 command to perform this action.
The maximum number of connections to one server for each download. By default this will establish one connection to each host. We can establish more then one connection to each host to speedup download by adding-x2 (2 means, two connection)option with aria2 command