Updated: 28 September 2026 · Applies to: Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9
CentOS 8 is end of life. curl transfers data to and from servers (HTTP, HTTPS, FTP, SFTP and more). It is installed by default on Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9; if not: dnf install curl or apt install curl.
Everyday examples
curl https://example.com # print a page
curl -I https://example.com # headers only (status, cache, server)
curl -L -o file.zip https://example.com/file.zip # follow redirects, save to a file
curl -C - -O https://example.com/big.iso # resume a download
curl -u user:pass https://example.com/private # basic authentication
curl -X POST -H "Content-Type: application/json" -d '{"name":"test"}' https://api.example.com/items
curl -w "%{http_code} %{time_total}s\n" -o /dev/null -s https://example.com # status and timing
Troubleshooting
-vshows the full conversation, including TLS details.--resolve example.com:443:192.0.2.10tests a site on a new server before changing DNS.-kskips certificate checks; use it only for testing.
Uploading and limits
curl -T report.pdf --user user:pass ftp://ftp.example.com/uploads/ # upload over FTP curl -T report.pdf -u user sftp://server.example.com/home/user/ # upload over SFTP curl --limit-rate 2M -O https://example.com/big.iso # limit the speed