Docs / Linux Basics / How to Use wget and curl to Download Files

How to Use wget and curl to Download Files

By Admin · Feb 25, 2026 · Updated Apr 24, 2026 · 368 views · 1 min read

wget and curl are command-line tools for downloading files from the internet.

wget

# Download a file
wget https://example.com/file.tar.gz

# Download to specific location
wget -O /tmp/file.tar.gz https://example.com/file.tar.gz

# Download in background
wget -b https://example.com/large-file.iso

# Resume interrupted download
wget -c https://example.com/large-file.iso

curl

# Download a file
curl -O https://example.com/file.tar.gz

# Download with custom name
curl -o myfile.tar.gz https://example.com/file.tar.gz

# Follow redirects
curl -L https://example.com/download

# Show headers only
curl -I https://example.com

# Send POST request
curl -X POST -d "key=value" https://api.example.com/endpoint

Was this article helpful?