Learn how to download files using cURL in Linux, macOS, and Windows.
How to Download Files Using cURL Command
- Step 1: Basic Download with Original Name — Run
curl -O "https://abctool.info". - Step 2: Save to Custom Filename — Run
curl -o "custom_name.ext" "https://abctool.info". - Step 3: Follow Redirect Links (-L) — Always append
-Lso cURL follows HTTP 301/302 redirects.
How to Follow 301/302 Redirect Links with cURL (-L)
Many file hosts redirect requests to a CDN endpoint. Without the -L flag, cURL only downloads a short 301 HTML page instead of the actual file!
How to Resume Broken Downloads Using cURL (-C -)
If a large download is interrupted, append -C - to automatically resume downloading from where it left off:
curl -L -C - -O "https://abctool.info"