Request basics
Inspect your curl installation
Check the installed curl version, supported protocols, TLS backend, and features before relying on an option.
10 minute lesson
curl is both a command-line tool and a transfer library (libcurl) that other programs embed. The tool you type is built from many optional pieces, and builds differ by operating system, TLS backend, protocol support, and enabled features. The curl on a fresh macOS is not the same build as the curl in an Alpine container, even when the version numbers look close.
That is why this course starts here. When an option misbehaves, the first question is always: what exact curl am I running?
Read the version output
Inspect the build you will use for every lab:
curl --version
You get something like:
curl 8.7.1 (x86_64-apple-darwin24.0) libcurl/8.7.1 (SecureTransport) LibreSSL/3.3.6
Release-Date: 2024-03-27
Protocols: dict file ftp ftps http https imap imaps ...
Features: alt-svc AsynchDNS HSTS HTTP2 IPv6 SSL ...
Read it line by line. The first line names the version, the platform, and the TLS backend — the library curl uses for HTTPS. The TLS backend explains real behavioral differences, like where curl looks for trusted certificates. The Protocols line lists every URL scheme this build accepts. The Features line tells you whether things like HTTP/2 support were compiled in.
Save the output with your lab notes so later behavior has a concrete version attached. “It failed on curl 8.7.1 with LibreSSL” is evidence. “It failed on my laptop” is not.
Match the documentation to the build
Options get added in specific versions. --json, for example, only exists since curl 7.82.0, and plenty of servers still run older builds. Do not assume an online man page exactly matches an older system curl.
Ask your own build instead:
curl --help all | grep json
man curl
curl --help all lists every option this binary understands, and man curl opens the manual that shipped with it. If an option from a tutorial is missing from that list, the tutorial is not wrong — your curl is older, and now you know before wasting time on mystery errors.
Lesson completed