Table of Contents#
- What is Axel?
- Key Features of Axel
- Installation on Linux
- Basic Usage
- Advanced Features & Options
- Configuration
- Axel vs. wget vs. curl: A Comparison
- Tips and Best Practices
- Troubleshooting Common Issues
- Conclusion
- References
What is Axel?#
Axel is a multi-threaded command-line download accelerator for Linux (and other Unix-like systems). Written in C, it was first released in 2001 by Wilmer van der Gaast and is now maintained by the open-source community. Its core principle is simple: instead of downloading a file via a single connection (like most tools), Axel splits the file into smaller chunks and downloads them in parallel using multiple connections to the server. This parallelism can significantly speed up downloads, especially for large files or on networks with high latency.
Axel supports popular protocols like HTTP, HTTPS, and FTP, making it compatible with most file-hosting services. It is lightweight (no GUI bloat), resource-efficient, and designed to handle unstable networks by resuming failed downloads seamlessly.
Key Features of Axel#
Axel’s popularity stems from its robust feature set, tailored for efficient downloading:
- Multi-Threaded Downloads: Splits files into segments and downloads them simultaneously via multiple connections (default: 4 connections).
- Resume Support: Resumes interrupted downloads using the
-cflag, avoiding redundant data transfer. - Bandwidth Limiting: Controls download speed with the
-sflag to prevent hogging network resources. - Protocol Support: Works with HTTP, HTTPS, and FTP (note: SFTP/SCP are not supported).
- Proxy Integration: Supports HTTP/FTP proxies for networks behind firewalls.
- Customizable Output: Allows specifying output filenames, directories, and verbosity levels.
- Low Resource Usage: Lightweight and efficient, making it ideal for servers or low-end systems.
- Quiet Mode: Minimizes output for scripting or background tasks.
Installation on Linux#
Axel is available in the default repositories of most Linux distributions. Below are installation instructions for popular distros:
Debian/Ubuntu#
On Debian, Ubuntu, or their derivatives (e.g., Linux Mint), use apt:
sudo apt update && sudo apt install axel -yFedora/RHEL#
On Fedora, CentOS Stream, or RHEL, use dnf (or yum for older RHEL versions):
sudo dnf install axel -yArch Linux#
On Arch Linux or Manjaro, use pacman:
sudo pacman -S axelSource Installation#
For distros where Axel is not pre-packaged (e.g., older Linux versions), compile from source:
-
Install dependencies (C compiler and libraries):
# Debian/Ubuntu: sudo apt install build-essential libssl-dev # Fedora/RHEL: sudo dnf install gcc openssl-devel # Arch Linux: sudo pacman -S base-devel openssl -
Download the latest source code from the Axel GitHub repo:
git clone https://github.com/axel-download-accelerator/axel.git cd axel -
Compile and install:
./configure make sudo make install
Basic Usage#
Axel’s syntax is straightforward. The most basic command to download a file is:
axel [URL]Example 1: Download a File#
To download an Ubuntu ISO (e.g., ubuntu-22.04.3-live-server-amd64.iso):
axel https://releases.ubuntu.com/22.04/ubuntu-22.04.3-live-server-amd64.isoAxel will split the file into 4 segments (default) and download them in parallel. You’ll see a progress bar for each segment, along with the total download speed and ETA.
Example 2: Specify Number of Connections#
Use the -n flag to set the number of parallel connections (e.g., 8 connections for faster downloads):
axel -n 8 https://releases.ubuntu.com/22.04/ubuntu-22.04.3-live-server-amd64.isoNote: Some servers limit the number of concurrent connections. If you get errors, reduce the number (e.g., -n 4).
Example 3: Quiet Mode#
For minimal output (useful in scripts), use -q (quiet) or -v (verbose) for detailed logs:
axel -q -n 6 https://example.com/large-file.zip # Quiet mode
axel -v -n 6 https://example.com/large-file.zip # Verbose modeAdvanced Features & Options#
Axel offers a range of flags to customize downloads. Here are key advanced use cases:
Resuming Interrupted Downloads#
If a download is interrupted (e.g., network failure), use -c to resume:
axel -c https://example.com/large-file.zipAxel will check the existing partial file and resume from where it left off.
Bandwidth Limiting#
To avoid saturating your network, limit download speed with -s (speed in bytes per second). For example, limit to 1MB/s (1,048,576 bytes/s):
axel -s 1048576 https://example.com/large-file.zipCustom Output Filename#
Use -o to specify a custom name for the downloaded file:
axel -o ubuntu-server.iso https://releases.ubuntu.com/22.04/ubuntu-22.04.3-live-server-amd64.isoProxy Support#
If you’re behind a proxy (e.g., corporate network), use -x to specify the proxy server:
# HTTP proxy:
axel -x http://proxy.example.com:8080 https://example.com/file.zip
# FTP proxy:
axel -x ftp://proxy.example.com:21 https://example.com/file.zipUser-Agent Spoofing#
Some servers block downloads from non-browser user-agents. Use -U to mimic a browser (e.g., Chrome):
axel -U "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" https://example.com/file.zipConfiguration#
Axel reads configuration from two files:
- System-wide:
/etc/axelrc - User-specific:
~/.axelrc
The user-specific config (~/.axelrc) overrides system settings. You can define default options here to avoid repeating flags.
Sample ~/.axelrc#
# Set default number of connections (1-20)
connections = 8
# Default output directory
output_dir = ~/Downloads
# Default user-agent
user_agent = "Mozilla/5.0 (X11; Linux x86_64) Axel/2.17.11"
# Bandwidth limit (bytes per second; 0 = unlimited)
max_speed = 0
# Proxy settings (uncomment to enable)
# http_proxy = http://proxy.example.com:8080
# ftp_proxy = ftp://proxy.example.com:21To apply changes, save the file and run Axel normally.
Axel vs. wget vs. curl: A Comparison#
| Feature | Axel | wget | curl |
|---|---|---|---|
| Primary Use | Multi-threaded downloads | Recursive mirroring, downloads | Data transfer (APIs, files) |
| Connections | Multi-threaded (parallel) | Single-threaded | Single-threaded |
| Resume Support | Yes (-c) | Yes (-c) | Yes (-C -) |
| Protocols | HTTP, HTTPS, FTP | HTTP, HTTPS, FTP, FTPS, SFTP | HTTP, HTTPS, FTP, SFTP, SCP, etc. |
| Bandwidth Limiting | Yes (-s) | Yes (--limit-rate) | Yes (--limit-rate) |
| Proxy Support | Yes | Yes | Yes |
| Recursive Downloads | No | Yes (-r) | No (use wget for mirroring) |
| Lightweight | Very (small binary size) | Lightweight | Lightweight |
When to use Axel: For large files, slow networks, or when you need faster downloads via parallel connections.
When to use wget: For mirroring websites, recursive downloads, or FTP site backups.
When to use curl: For API interactions, POST requests, or transferring data to/from servers.
Tips and Best Practices#
- Optimize Connections: Start with 4-8 connections. Too many (e.g., >16) may trigger server rate limits or cause timeouts.
- Check Server Policies: Some servers block multi-threaded downloads. If Axel fails, try reducing connections or using
wget/curl. - Verify Downloads: After downloading, use
md5sumorsha256sumto check file integrity against the server’s hash. - Automate with Scripts: Use Axel in bash scripts for batch downloads (e.g., syncing backups):
# Example: Download multiple files with 6 connections each urls=("https://file1.iso" "https://file2.zip" "https://file3.tar.gz") for url in "${urls[@]}"; do axel -n 6 -o ~/Downloads "$url" done
Troubleshooting Common Issues#
"Too many connections" Error#
Cause: The server limits concurrent connections.
Fix: Reduce the number of connections with -n (e.g., -n 4).
"SSL certificate problem"#
Cause: Missing CA certificates or self-signed SSL certificates.
Fix: Install or update CA certificates on your system:
# Debian/Ubuntu:
sudo apt install ca-certificates
# Fedora/RHEL:
sudo dnf install ca-certificatesFor self-signed certificates, consider using wget with its --no-check-certificate option instead.
"Permission denied"#
Cause: Axel lacks write permissions for the output directory.
Fix: Specify a writable directory with -o (e.g., -o ~/Downloads/file.zip).
Conclusion#
Axel is a powerful, lightweight tool that transforms slow, single-threaded downloads into fast, parallelized transfers. Whether you’re a system administrator downloading large ISOs, a developer fetching dependencies, or a casual user grabbing files, Axel’s multi-threaded approach can save significant time. Its simplicity, flexibility, and support for resuming downloads make it a must-have in any Linux user’s toolkit.
If you haven’t tried Axel yet, install it today and experience the difference in download speeds!