Reference
curl flags I always forget
Updated Jul 4, 2026 1 min
I use curl every day and still forget half its flags. Here is the short list I keep coming back to.
The everyday flags
| Flag | What it does |
|---|---|
-s |
Silent: no progress meter or errors |
-S |
Show errors even with -s (use them together) |
-L |
Follow redirects |
-o file |
Write output to a file |
-O |
Save with the remote filename |
-I |
Headers only (a HEAD request) |
-f |
Fail quietly on HTTP errors (good in scripts) |
-H |
Add a request header |
-d |
Send a body (implies POST) |
The combination I paste most
curl -fsSL https://example.com/script.sh | bash
-f fails instead of piping an error page into your shell, -s hides the progress meter, -S still shows a real error if one happens, and -L follows the redirect. That set is why so many install one-liners look identical.
Inspecting a response
curl -sI https://example.com # just the headers
curl -s -o /dev/null -w "%{http_code}\n" https://example.com # just the status code
The second one is my go-to for a quick "is it up and what does it return" check.