How to use download accelerator in Linux terminal
Download accelerator works by splitting a download into multiple segments, and they are downloaded in parallel, each with a separate connection. It circumvents the download speed cap by some providers that is applied per connection. The segmented download files will be combined into a single file once all segments finished downloading.
Download accelerators usually are part of download manager programs. It could come as a standalone desktop application or a browser extension. In Linux, there are command-line download accelerators available such as axel. It is great for automation and when working on remote servers via SSH.
Steps to speed up file download from Linux command line:
-
Launch terminal.
-
Install axel for your system.
$ sudo apt update && sudo apt install --assume-yes axel # Ubuntu and Debian
-
Go to the folder that you want to download your file into (optional).
$ cd Downloads/
-
Copy download URL from browser (optional).
-
Download file using axel.
$ axel https://wordpress.org/latest.zip Initializing download: https://wordpress.org/latest.zip File size: 12121295 bytes Opening output file wordpress-5.2.2.zip Starting download [ 0%] .......... .......... .......... .......... .......... [ 34.8KB/s] [ 0%] .......... .......... .......... .......... .......... [ 62.0KB/s] [ 0%] .......... .......... .......... .......... .......... [ 80.2KB/s] [ 1%] .......... .......... .......... .......... .......... [ 82.1KB/s] [ 1%] .......... .......... .......... .......... .......... [ 102.8KB/s] [ 2%] .......... .......... .......... .......... .......... [ 121.7KB/s] [ 2%] .......... .......... .......... .......... .......... [ 128.9KB/s] [ 2%] .......... .......... .......... .......... .......... [ 148.0KB/s] [ 3%] .......... .......... .......... .......... .......... [ 163.5KB/s] ##### snipped [ 96%] .......... .......... .......... .......... .......... [1204.8KB/s] [ 96%] .......... .......... .......... .......... .......... [1209.3KB/s] [ 97%] .......... .......... .......... .......... .......... [1214.3KB/s] [ 97%] .......... .......... .......... .......... .......... [1219.6KB/s] [ 97%] .......... .......... .......... .......... .......... [1182.0KB/s] [ 98%] .......... .......... .......... .......... .......... [1188.2KB/s] [ 98%] .......... .......... .......... .......... ... Connection 2 finished ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,....... [1191.5KB/s] [ 99%] .......... .......... .......... .......... Connection 0 finished ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, .......... [1196.7KB/s] [ 99%] .......... .......... .......... ... Connection 3 finished ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,....... .......... [1201.4KB/s] [100%] .......... .......... .......... ....... Downloaded 11.6 Megabyte in 9 seconds. (1204.73 KB/s)
axel by default will download using 4 separate connections. That can be changed along with other options as below:
$ axel --help Usage: axel [options] url1 [url2] [url...] --max-speed=x -s x Specify maximum speed (bytes per second) --num-connections=x -n x Specify maximum number of connections --max-redirect=x Specify maximum number of redirections --output=f -o f Specify local output file --search[=n] -S[n] Search for mirrors and download from n servers --ipv4 -4 Use the IPv4 protocol --ipv6 -6 Use the IPv6 protocol --header=x -H x Add HTTP header string --user-agent=x -U x Set user agent --no-proxy -N Just don't use any proxy server --insecure -k Don't verify the SSL certificate --no-clobber -c Skip download if file already exists --quiet -q Leave stdout alone --verbose -v More status information --alternate -a Alternate progress indicator --help -h This information --timeout=x -T x Set I/O and connection timeout --version -V Version information Visit https://github.com/axel-download-accelerator/axel/issues to report bugs