curl

Transfer data to or from a server using HTTP, HTTPS, FTP, and more.

low risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
What it does

curl is the Swiss Army knife for HTTP. -I sends HEAD request (headers only). -o saves to file. -s enables silent mode. -X sets the HTTP method. Essential for API testing, downloading files, and debugging web requests.

Common flags
FlagMeaning
-I --headFetch HTTP headers only (HEAD request)
-o --outputWrite output to a file
-L --locationFollow HTTP redirects
-s --silentSilent mode — no progress bar
-X --requestSpecify HTTP method (GET, POST, PUT, DELETE)
-H --headerAdd a custom HTTP header
-d --dataSend POST body data
-k --insecureSkip SSL certificate verification (testing only)
Examples
curl -I https://example.comCheck HTTP response headers and status code · explain & risk-check →
curl -X POST -H 'Content-Type: application/json' -d '{"key":"val"}' https://api.example.com/dataSend JSON POST to a REST API endpoint · explain & risk-check →
curl -fsSL https://get.docker.com | bashDownload and execute Docker install script · explain & risk-check →
Pro tip

Check HTTP status codes in scripts: `curl -w '\n%{http_code}' -s -o /dev/null https://url` — no download, just the status.

Related
wget httpie nc jq openssl
Open the full explainer →More in Networking

Reference text is hand-written and may be incomplete — check man curl for your version. Test destructive commands on a non-production system first.