Command line basics
The command-line tool “curl” is a binary executable file. The curl project
does not by itself distribute or provide binaries. Binary files are highly
system specific and oftentimes also bound to specific system versions.
To get a curl for your platform and your system, you need to get a curl
executable from somewhere. Many people build their own from the source code
provided by the curl project, lots of people install it using a package tool
for their operating system and yet another portion of users download binary
install packages from sources they trust.
Also, remember that curl is often built to use third-party libraries to
perform and unless curl is built to use them statically you must also have
those third-party libraries installed; the exact set of libraries will
vary depending on the particular build you get.
There are many different command lines, shells and prompts in which curl can
be used. They all come with their own sets of limitations, rules and
guidelines to follow. The curl tool is designed to work with any of them
without causing troubles but there may be times when your specific command
line system doesn’t match what others use or what is otherwise documented.
In some environments, like PowerShell on Windows, the authors of the command
line system decided they know better and “help” the user to use another tool
instead of curl when is typed, by providing an alias that takes
precedence when a command line is executed. In order to use curl properly with
PowerShell, you need to type in its full name including the extension:
“curl.exe”.
Different command-line environments will also have different maximum command
line lengths and force the users to limit how large amount of data that can be
put into a single line. curl adapts to this by offering a way to provide
command-line options through a file—or from stdin—using the -K option.
This is a design choice, as it allows you to really tweak how curl does its
protocol communications and you can have curl massage your server
implementations in the most creative ways.