cURL - Set a default user agent


I use curl’s CLI tools quite a bit and was wondering if there is a way to set a default user agent other than “curl/7.4.2”. I know about -A, but adding that to your request every time can be a bit of a pain.

1 Like

Here’s how to set such an option in a config file


That worked! Create a .curlrc file with the following:

user-agent = "Anything"
1 Like