Axel
Overview
Sezione intitolata “Overview”Axel is a lightweight command-line download accelerator that improves download speeds by using multiple simultaneous connections to retrieve files. It supports HTTP, HTTPS, and FTP protocols and works across Linux, macOS, and Windows platforms. Axel is particularly useful for downloading large files over slow or unstable connections.
Installation
Sezione intitolata “Installation”Linux (Debian/Ubuntu)
Sezione intitolata “Linux (Debian/Ubuntu)”sudo apt-get update
sudo apt-get install axel
Linux (Fedora/RHEL)
Sezione intitolata “Linux (Fedora/RHEL)”sudo dnf install axel
brew install axel
Linux (Alpine)
Sezione intitolata “Linux (Alpine)”apk add axel
From Source
Sezione intitolata “From Source”git clone https://github.com/axel-download-accelerator/axel.git
cd axel
./configure
make
sudo make install
Basic Usage
Sezione intitolata “Basic Usage”| Command | Description |
|---|---|
axel URL | Download file using default settings (4 connections) |
axel -o filename URL | Download and save with custom filename |
axel -n 8 URL | Use 8 simultaneous connections |
axel --help | Display help and available options |
axel --version | Show Axel version information |
Connection Management
Sezione intitolata “Connection Management”Multiple Connections
Sezione intitolata “Multiple Connections”# Download with 8 connections (faster for large files)
axel -n 8 https://example.com/largefile.iso
# Use 12 connections for maximum speed
axel -n 12 https://example.com/video.mp4
# Single connection mode (useful for unstable servers)
axel -n 1 https://example.com/file.zip
Connection Control
Sezione intitolata “Connection Control”# Set number of connections and search for mirrors
axel -n 10 -S 4 https://example.com/download.tar.gz
# Verbose output showing connection details
axel -v https://example.com/file.bin
# Quiet mode (minimal output)
axel -q https://example.com/package.tar.gz
Output and File Naming
Sezione intitolata “Output and File Naming”Custom Output Filenames
Sezione intitolata “Custom Output Filenames”# Save with specific filename
axel -o myfile.zip https://example.com/download
# Save to specific directory
axel -o /tmp/downloads/file.iso https://example.com/file.iso
# Download multiple files to same directory
axel -o /downloads/ https://example.com/file1.zip
axel -o /downloads/ https://example.com/file2.zip
Progress Display
Sezione intitolata “Progress Display”# Default progress bar with speed and ETA
axel https://example.com/file.tar.gz
# Verbose mode with detailed connection information
axel -v https://example.com/largefile.bin
# Very verbose with debug information
axel -vv https://example.com/download.tar.bz2
Bandwidth Management
Sezione intitolata “Bandwidth Management”Limiting Download Speed
Sezione intitolata “Limiting Download Speed”# Limit bandwidth to 1 MB/s
axel -s 1048576 https://example.com/file.zip
# Limit to 500 KB/s (useful for avoiding bandwidth throttling)
axel -s 512000 https://example.com/video.mp4
# Limit to 100 KB/s for background downloads
axel -s 102400 https://example.com/package.tar.gz
Adaptive Speed Control
Sezione intitolata “Adaptive Speed Control”# Start with 10 connections but limit speed
axel -n 10 -s 2097152 https://example.com/large.iso
# Adjust connections dynamically for stability
axel -n 8 -s 5242880 https://example.com/download.tar.gz
HTTP Headers and Authentication
Sezione intitolata “HTTP Headers and Authentication”Custom Headers
Sezione intitolata “Custom Headers”# Add User-Agent header for compatibility
axel -H "User-Agent: Mozilla/5.0" https://example.com/file.zip
# Multiple custom headers
axel -H "User-Agent: Mozilla/5.0" -H "Accept-Language: en-US" https://example.com/download
# Referer header for hotlink protection
axel -H "Referer: https://example.com/downloads" https://cdn.example.com/file.tar.gz
Authentication
Sezione intitolata “Authentication”# Basic HTTP authentication
axel -a username:password https://example.com/secured-file.zip
# Download from private repository
axel -a user:token https://api.github.com/repos/user/repo/releases/download/v1.0/app.tar.gz
Proxy Support
Sezione intitolata “Proxy Support”HTTP/HTTPS Proxy
Sezione intitolata “HTTP/HTTPS Proxy”# Download through HTTP proxy
axel -p http://proxy.example.com:8080 https://example.com/file.zip
# Proxy with authentication
axel -p username:password@proxy.example.com:8080 https://example.com/download
# HTTPS proxy
axel -p https://proxy.example.com:8443 https://example.com/largefile.iso
Environment Variables
Sezione intitolata “Environment Variables”# Set proxy via environment variable
export http_proxy=http://proxy.example.com:8080
axel https://example.com/file.zip
# Set proxy for HTTPS
export https_proxy=http://proxy.example.com:8080
axel https://secure.example.com/file.tar.gz
# Unset proxy
unset http_proxy https_proxy
Resume Downloads
Sezione intitolata “Resume Downloads”Resuming Interrupted Downloads
Sezione intitolata “Resuming Interrupted Downloads”# Resume incomplete download
axel https://example.com/largefile.iso
# Axel automatically detects partial files and resumes
# If download was interrupted, run same command again
# Force resume even if file seems complete
axel -a https://example.com/file.zip
Cleanup Partial Downloads
Sezione intitolata “Cleanup Partial Downloads”# Remove partial download and restart fresh
rm largefile.iso.st
axel https://example.com/largefile.iso
# List partial downloads in current directory
ls -la *.st
# Remove all partial downloads
rm *.st
Advanced Usage
Sezione intitolata “Advanced Usage”Configuration Files
Sezione intitolata “Configuration Files”# Axel reads config from ~/.axelrc
cat ~/.axelrc
# Set default number of connections
# In ~/.axelrc: num_connections=8
# Set default output directory
# In ~/.axelrc: outdir=/home/user/downloads
Batch Downloads
Sezione intitolata “Batch Downloads”# Create file list
cat > downloads.txt << EOF
https://example.com/file1.zip
https://example.com/file2.tar.gz
https://example.com/file3.iso
EOF
# Download all files
while read url; do
axel -n 8 "$url"
done < downloads.txt
Combining Options
Sezione intitolata “Combining Options”# Maximum speed with 12 connections, custom filename, verbose output
axel -n 12 -o /tmp/download.zip -v https://example.com/file.zip
# Bandwidth limited, authenticated, through proxy with custom header
axel -n 8 -s 1048576 -a user:pass -p proxy:8080 \
-H "Referer: https://example.com" https://example.com/secure-download.tar.gz
Comparison with Other Tools
Sezione intitolata “Comparison with Other Tools”Axel vs wget
Sezione intitolata “Axel vs wget”# wget - single connection, simple
wget https://example.com/file.zip
# axel - multi-connection, faster
axel https://example.com/file.zip
# axel typically 2-4x faster for large files
Axel vs curl
Sezione intitolata “Axel vs curl”# curl - primarily for APIs and single transfers
curl -O https://example.com/file.zip
# axel - optimized for large file downloads
axel https://example.com/file.zip
Axel vs aria2
Sezione intitolata “Axel vs aria2”# aria2 - more features, steeper learning curve
aria2c -x 16 https://example.com/file.zip
# axel - simpler syntax, lightweight
axel -n 16 https://example.com/file.zip
Practical Examples
Sezione intitolata “Practical Examples”Download Large ISO Files
Sezione intitolata “Download Large ISO Files”# Download Linux distribution ISO with 10 connections
axel -n 10 https://releases.ubuntu.com/22.04/ubuntu-22.04-desktop-amd64.iso
# Download and verify
sha256sum ubuntu-22.04-desktop-amd64.iso
Background Download with Speed Limiting
Sezione intitolata “Background Download with Speed Limiting”# Limit bandwidth to avoid network congestion
axel -n 6 -s 2097152 https://example.com/largefile.tar.gz &
# Check progress in background
jobs
Resume Failed Download
Sezione intitolata “Resume Failed Download”# Initial attempt
axel -n 8 https://example.com/software.bin
# Connection dropped? Simply re-run the same command
# Axel detects the partial file and resumes automatically
axel -n 8 https://example.com/software.bin
Download from Mirror Sites
Sezione intitolata “Download from Mirror Sites”# Download with fallback sources
axel -n 8 https://primary-mirror.example.com/file.zip
# If primary fails, manually try mirror
axel -n 8 https://backup-mirror.example.com/file.zip
Troubleshooting
Sezione intitolata “Troubleshooting”Connection Refused
Sezione intitolata “Connection Refused”# Server may block multiple connections
axel -n 1 https://example.com/file.zip
# Try with fewer connections
axel -n 4 https://example.com/file.zip
Slow Downloads
Sezione intitolata “Slow Downloads”# Verify bandwidth isn't limited
axel -v https://example.com/file.zip
# Try increasing connections
axel -n 16 https://example.com/file.zip
# Check network conditions
ping example.com
File Already Exists
Sezione intitolata “File Already Exists”# Axel won't overwrite; rename or remove existing file
rm existingfile.zip
axel https://example.com/file.zip
# Or save with different name
axel -o file-new.zip https://example.com/file.zip
Tips and Tricks
Sezione intitolata “Tips and Tricks”Speed up Downloads Across Networks
Sezione intitolata “Speed up Downloads Across Networks”# Optimal settings for most scenarios
axel -n 8 -H "User-Agent: Mozilla/5.0" https://example.com/file.zip
Monitor Download in Real-time
Sezione intitolata “Monitor Download in Real-time”# Use watch command to monitor file size
watch -n 1 'ls -lh largefile.iso'
# In another terminal, run axel
axel -n 8 https://example.com/largefile.iso
Save Bandwidth with Partial Downloads
Sezione intitolata “Save Bandwidth with Partial Downloads”# Stop download with Ctrl+C
axel https://example.com/largefile.tar.gz
# Press Ctrl+C to interrupt
# Resume continues from where it stopped
axel https://example.com/largefile.tar.gz