[Axel][7]is a lightweight download utility, it does the same thing how other accelerator does. It opens multiple connections for one file and each connections download separate file fragment to complete the download more quickly.
Axel supports HTTP, HTTPS, FTP and FTPS protocols. It can also use multiple mirrors for single file download. So, Axel can speed up a download up to 40% (approximately, i personally realized). It’s very lightweight because no dependencies and uses very less CPU & RAM.
Axel downloads all the data directly to the destination file, using one single thread.
Note :There is no option to download the two file in single command
You can also try alternative Command Line Download Managers/Accelerators
* [aria2 – The ultra fast download utility][1]
* [wget – Standard command line download utility][2]
* [curl – command line download utility][3]
* [Best 4 Command Line Download Managers/Accelerators for Linux][4]
Most of the distribution (Debian, Ubuntu, Mint, Fedora, suse, openSUSE, Arch Linux, Manjaro, Mageia, etc.) has the axel package so we can easily install it from distribution official repository. For CentOS/RHEL we need to enable[EPEL Repository][5].
```
[Install Axel on Debian/Ubuntu/LinuxMint]
$ sudo apt-get install axel
[Install Axel on RHEL/CentOS]
$ sudo yum install axel
[Install Axel on Fedora]
$ sudo dnf install axel
[Install Axel on openSUSE]
$ sudo zypper install axel
[Install Axel on Mageia]
$ sudo urpmi axel
[Install Axel on Arch Linux based system]
$ sudo pacman -S axel
```
#### 1) 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 (No of connection established, download speed, download progress, how much time it took to complete the download & where connection finished) of file.
```
# axel https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
Downloaded 21.6 megabytes in 3 seconds. (5755.94 KB/s)
```
#### 2) Save the file with different name
You can save the file with different name while initiate downloading by adding-o (lowercase)option followed by file name. Here we are going to save the filename withowncloud.tar.bz2.
```
# axel -o cloud.tar.bz2 https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
Downloaded 21.6 megabytes in 3 seconds. (6001.05 KB/s)
```
#### 3) Limit download speed
By default axel Set the maximum speed for downloading file in Bytes per Second. We can use this option when we have a slow network connection. Just add`-s`option followed by bytes value. Here we are going to download a file with`512KB/s`.
```
# axel -s 512000 https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
Downloaded 21.6 megabytes in 44 seconds. (494.54 KB/s)
```
#### 4) Limit the Connections
By default axel establish 4 connection to get the file from different mirrors. Additionally we can boost the download speed by adding more connection with`-n`option followed by connections count`8`. We have added eight connection for safer side but unfortunately it took much time to get the file downloaded.
```
# axel -n 10 https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
Downloaded 21.6 megabytes in 5 seconds. (4109.41 KB/s)
```
#### 5) Resume Incomplete download
By default axel have the behavior of Resume Incomplete download. Axel used to update the state file`(.st extension)`regularly while downloading the file. Due to some reason, the download get hang in middle ? don’t worry, just use the same axel command which will check`file`&`file.st`, if found, download is resumed where it stopped.
```
# axel https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
Downloaded 18.3 megabytes in 2 seconds. (7009.79 KB/s)
```
The following output clearly showing two files`owncloud-9.0.0.tar.bz2`&`owncloud-9.0.0.tar.bz2.st`when we disconnect the download. When re initiating the download again, it starts exactly where it stopped before.
```
# ls -lh
total 19M
-rw------- 1 root root 22M Dec 27 08:33 owncloud-9.0.0.tar.bz2
-rw------- 1 root root 44 Dec 27 08:33 owncloud-9.0.0.tar.bz2.st
# axel https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
Downloaded 14.3 megabytes in 2 seconds. (5916.11 KB/s)
```
We have interrupted the above download to show you the alternate progress indicator status clearly while downloading the file. Once the file get downloaded successfully you can see the same output like below.
```
# axel -a https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
File size: 22678208 bytes
Opening output file owncloud-9.0.0.tar.bz2
Starting download
Connection 2 finished ]
Connection 1 finished ]
Connection 3 finished ]
Connection 0 finished ]
Downloaded 21.6 megabytes in 4 seconds. (5062.32 KB/s)
```
#### 8) Read more about axel
If you want to know more option which is available for axel, simply navigate to man page.