curl transfers data to and from a URL. It has been on nearly every Unix machine since 1998, it is the tool documentation reaches for when it shows an HTTP request, and libcurl, the library inside it, is in cars, phones, printers and most of the software that talks to the network.
HTTP is the common case, with two dozen other protocols behind the same
flags. -v shows the whole exchange, --json sends a body with the
right headers, -L follows redirects, -c and -b keep cookies between
requests, and -w prints whatever you want to know about a transfer
once it is done, which is how one line of curl becomes a health check in
a script. A URL can hold a list in braces, and curl expands it into one
request per item.
The demo opens a shell with a local httpbin server answering on
http://localhost. It sends back what each request carried, so you can
see exactly what curl did. Try curl -v http://localhost/get first, then
curl --json @order.json http://localhost/post, curl -IL http://localhost/redirect/3 and the cookie jar. The VM is private to
your browser tab; nothing you type leaves it.
Commands to try
curl -v http://localhost/get | the whole exchange: > is what curl sent, < what came back |
curl --json @order.json http://localhost/post | send JSON from a file, with the headers set for you |
curl -IL http://localhost/redirect/3 | headers only, following redirects until a page answers 200 |
curl -L -c jar.txt -b jar.txt 'http://localhost/cookies/set?flavor=oatmeal' | save the cookies the server sets and send them back |
curl -s -o /dev/null -w '%{http_code} %{url}\n' 'http://localhost/status/{200,404,418}' | three requests from one URL, one status line each |
Install curl on your own machine
| Alpine | apk add curl |
| Debian / Ubuntu | apt install curl |
| macOS (Homebrew) | brew install curl |
This VM was last built on Oct 11, 2026. How Demoshell demos work →
Similar tools you can try here
- curlie — Httpie's syntax and coloured output on top of curl, every curl option still there, run against a local server in a private Linux VM.
- pet — The command-line snippet manager that saves a long command once and finds it by what it does, live in a private Linux VM.
- navi — Interactive cheatsheets for the command line that pick a command, fill in its arguments and run it, in a private Linux VM.
- Miller — Awk, sed, cut and sort for CSV, TSV and JSON by field name, run over a sample orders file in a private Linux VM.
- Black — The uncompromising Python code formatter, in a playground backed by blackd running in a private Linux VM.