curl - Transfer Data in Linux

From the Linux Essential Commands cheat sheet · Networking · verified Jul 2026

curl - Transfer Data

Make HTTP requests and download files from command line

bash
# GET request
curl https://api.example.com

# Save to file
curl -o output.html https://example.com
curl -O https://example.com/file.zip

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

# POST data
curl -X POST -d "key=value" https://api.example.com
✅ -O saves file with original name, -o specifies name
💡 -L follows redirects (important for many URLs)
🔍 Use -I to see headers only
networkhttpdownloadcurl

More Linux tasks

Back to the full Linux Essential Commands cheat sheet