Where Is the curl Config File?
curl reads ~/.curlrc on Linux on every invocation for default flags like retry, location following, and progress bars, unless --disable is passed.
Last updated
curl applies ~/.curlrc silently before every run, which makes it powerful and occasionally baffling. Retries, redirect following, and output flags set once govern all interactive use. The file uses bare long options without dashes.
Automation differs by design. The --disable flag tells curl to ignore the rc file, and many scripts pass it for reproducibility. When a command works by hand but fails in cron, the rc file versus --disable split is the first suspect.
Where curl stores this, by platform
~/.curlrc
Default curl flags loaded every run unless --disable. One long option per line without dashes. Scripts commonly skip it for determinism.
Frequently asked questions
What is the curlrc syntax?
Add one flag per line using long form without leading dashes, for example retry = 3. Quote values with spaces. Test with curl -v to confirm the file loads, since silent ignores hide typos.
Why do scripts behave differently under curl?
Scripts often pass --disable which skips ~/.curlrc entirely, while interactive shells load it. A flag you forgot in the file explains most divergences. Check scripts for --disable or -q before blaming servers.
Notice an outdated path? Let us know.