curl
Topic: Network
Program: curl
Asks a web service and shows its answer.
Package: net
Usage
curl [OPTION]... URL...
Description
Ask a web service for a URL and print its answer. In the simulator the answers are data, nothing leaves your device.
Options in the simulator
-
-s, --silent no progress display and no error message -
-S, --show-error with -s, still show error messages -
-I, --head ask only for the header lines and show them -
-i, --show-headers show the header lines before the content -
-o, --output=FILE write the content to FILE -
-O, --remote-name write the content to a file named like the last part of the URL -
-w, --write-out=FORMAT afterwards print FORMAT with %{http_code}, %{size_download}, %{url_effective} -
-f, --fail on an HTTP error print no content and exit with 22 -
-L, --location follow redirects -
--connect-timeout=SECONDS give up connecting after SECONDS -
-m, --max-time=SECONDS give up the whole transfer after SECONDS
258 more options of the real program, not in the simulator yet
-
--abstract-unix-socketneeds a value not in the simulator yetExplanation to come
-
--alt-svcneeds a value not in the simulator yetExplanation to come
-
--anyauthnot in the simulator yetExplanation to come
-
-a, --appendnot in the simulator yetExplanation to come
-
--aws-sigv4needs a value not in the simulator yetExplanation to come
-
--basicnot in the simulator yetExplanation to come
-
--ca-nativenot in the simulator yetExplanation to come
-
--cacertneeds a value not in the simulator yetExplanation to come
-
--capathneeds a value not in the simulator yetExplanation to come
-
-E, --certneeds a value not in the simulator yetExplanation to come
-
--cert-statusnot in the simulator yetExplanation to come
-
--cert-typeneeds a value not in the simulator yetExplanation to come
-
--ciphersneeds a value not in the simulator yetExplanation to come
-
--compressednot in the simulator yetExplanation to come
-
--compressed-sshnot in the simulator yetExplanation to come
-
-K, --configneeds a value not in the simulator yetExplanation to come
-
--connect-toneeds a value not in the simulator yetExplanation to come
-
-C, --continue-atneeds a value not in the simulator yetExplanation to come
-
-b, --cookieneeds a value not in the simulator yetExplanation to come
-
-c, --cookie-jarneeds a value not in the simulator yetExplanation to come
-
--create-dirsnot in the simulator yetExplanation to come
-
--create-file-modeneeds a value not in the simulator yetExplanation to come
-
--crlfnot in the simulator yetExplanation to come
-
--crlfileneeds a value not in the simulator yetExplanation to come
-
--curvesneeds a value not in the simulator yetExplanation to come
-
-d, --dataneeds a value not in the simulator yetExplanation to come
-
--data-asciineeds a value not in the simulator yetExplanation to come
-
--data-binaryneeds a value not in the simulator yetExplanation to come
-
--data-rawneeds a value not in the simulator yetExplanation to come
-
--data-urlencodeneeds a value not in the simulator yetExplanation to come
-
--delegationneeds a value not in the simulator yetExplanation to come
-
--digestnot in the simulator yetExplanation to come
-
-q, --disablenot in the simulator yetExplanation to come
-
--disable-eprtnot in the simulator yetExplanation to come
-
--disable-epsvnot in the simulator yetExplanation to come
-
--disallow-username-in-urlnot in the simulator yetExplanation to come
-
--dns-interfaceneeds a value not in the simulator yetExplanation to come
-
--dns-ipv4-addrneeds a value not in the simulator yetExplanation to come
-
--dns-ipv6-addrneeds a value not in the simulator yetExplanation to come
-
--dns-serversneeds a value not in the simulator yetExplanation to come
-
--doh-cert-statusnot in the simulator yetExplanation to come
-
--doh-insecurenot in the simulator yetExplanation to come
-
--doh-urlneeds a value not in the simulator yetExplanation to come
-
--dump-ca-embednot in the simulator yetExplanation to come
-
-D, --dump-headerneeds a value not in the simulator yetExplanation to come
-
--echneeds a value not in the simulator yetExplanation to come
-
--egd-fileneeds a value not in the simulator yetExplanation to come
-
--engineneeds a value not in the simulator yetExplanation to come
-
--etag-compareneeds a value not in the simulator yetExplanation to come
-
--etag-saveneeds a value not in the simulator yetExplanation to come
-
--expect100-timeoutneeds a value not in the simulator yetExplanation to come
-
--fail-earlynot in the simulator yetExplanation to come
-
--fail-with-bodynot in the simulator yetExplanation to come
-
--false-startnot in the simulator yetExplanation to come
-
-F, --formneeds a value not in the simulator yetExplanation to come
-
--form-escapenot in the simulator yetExplanation to come
-
--form-stringneeds a value not in the simulator yetExplanation to come
-
--ftp-accountneeds a value not in the simulator yetExplanation to come
-
--ftp-alternative-to-userneeds a value not in the simulator yetExplanation to come
-
--ftp-create-dirsnot in the simulator yetExplanation to come
-
--ftp-methodneeds a value not in the simulator yetExplanation to come
-
--ftp-pasvnot in the simulator yetExplanation to come
-
-P, --ftp-portneeds a value not in the simulator yetExplanation to come
-
--ftp-pretnot in the simulator yetExplanation to come
-
--ftp-skip-pasv-ipnot in the simulator yetExplanation to come
-
--ftp-ssl-cccnot in the simulator yetExplanation to come
-
--ftp-ssl-ccc-modeneeds a value not in the simulator yetExplanation to come
-
--ftp-ssl-controlnot in the simulator yetExplanation to come
-
-G, --getnot in the simulator yetExplanation to come
-
-g, --globoffnot in the simulator yetExplanation to come
-
--happy-eyeballs-timeout-msneeds a value not in the simulator yetExplanation to come
-
--haproxy-clientipneeds a value not in the simulator yetExplanation to come
-
--haproxy-protocolnot in the simulator yetExplanation to come
-
-H, --headerneeds a value not in the simulator yetExplanation to come
-
-h, --helpneeds a value not in the simulator yetExplanation to come
-
--hostpubmd5needs a value not in the simulator yetExplanation to come
-
--hostpubsha256needs a value not in the simulator yetExplanation to come
-
--hstsneeds a value not in the simulator yetExplanation to come
-
--http0.9not in the simulator yetExplanation to come
-
-0, --http1.0not in the simulator yetExplanation to come
-
--http1.1not in the simulator yetExplanation to come
-
--http2not in the simulator yetExplanation to come
-
--http2-prior-knowledgenot in the simulator yetExplanation to come
-
--http3not in the simulator yetExplanation to come
-
--http3-onlynot in the simulator yetExplanation to come
-
--ignore-content-lengthnot in the simulator yetExplanation to come
-
-k, --insecurenot in the simulator yetExplanation to come
-
--interfaceneeds a value not in the simulator yetExplanation to come
-
--ip-tosneeds a value not in the simulator yetExplanation to come
-
--ipfs-gatewayneeds a value not in the simulator yetExplanation to come
-
-4, --ipv4not in the simulator yetExplanation to come
-
-6, --ipv6not in the simulator yetExplanation to come
-
--jsonneeds a value not in the simulator yetExplanation to come
-
-j, --junk-session-cookiesnot in the simulator yetExplanation to come
-
--keepalive-cntneeds a value not in the simulator yetExplanation to come
-
--keepalive-timeneeds a value not in the simulator yetExplanation to come
-
--keyneeds a value not in the simulator yetExplanation to come
-
--key-typeneeds a value not in the simulator yetExplanation to come
-
--krbneeds a value not in the simulator yetExplanation to come
-
--libcurlneeds a value not in the simulator yetExplanation to come
-
--limit-rateneeds a value not in the simulator yetExplanation to come
-
-l, --list-onlynot in the simulator yetExplanation to come
-
--local-portneeds a value not in the simulator yetExplanation to come
-
--location-trustednot in the simulator yetExplanation to come
-
--login-optionsneeds a value not in the simulator yetExplanation to come
-
--mail-authneeds a value not in the simulator yetExplanation to come
-
--mail-fromneeds a value not in the simulator yetExplanation to come
-
--mail-rcptneeds a value not in the simulator yetExplanation to come
-
--mail-rcpt-allowfailsnot in the simulator yetExplanation to come
-
-M, --manualnot in the simulator yetExplanation to come
-
--max-filesizeneeds a value not in the simulator yetExplanation to come
-
--max-redirsneeds a value not in the simulator yetExplanation to come
-
--metalinknot in the simulator yetExplanation to come
-
--mptcpnot in the simulator yetExplanation to come
-
--negotiatenot in the simulator yetExplanation to come
-
-n, --netrcnot in the simulator yetExplanation to come
-
--netrc-fileneeds a value not in the simulator yetExplanation to come
-
--netrc-optionalnot in the simulator yetExplanation to come
-
-:, --nextnot in the simulator yetExplanation to come
-
--no-alpnnot in the simulator yetExplanation to come
-
-N, --no-buffernot in the simulator yetExplanation to come
-
--no-clobbernot in the simulator yetExplanation to come
-
--no-keepalivenot in the simulator yetExplanation to come
-
--no-npnnot in the simulator yetExplanation to come
-
--no-progress-meternot in the simulator yetExplanation to come
-
--no-sessionidnot in the simulator yetExplanation to come
-
--noproxyneeds a value not in the simulator yetExplanation to come
-
--ntlmnot in the simulator yetExplanation to come
-
--ntlm-wbnot in the simulator yetExplanation to come
-
--oauth2-bearerneeds a value not in the simulator yetExplanation to come
-
--output-dirneeds a value not in the simulator yetExplanation to come
-
-Z, --parallelnot in the simulator yetExplanation to come
-
--parallel-immediatenot in the simulator yetExplanation to come
-
--parallel-maxneeds a value not in the simulator yetExplanation to come
-
--passneeds a value not in the simulator yetExplanation to come
-
--path-as-isnot in the simulator yetExplanation to come
-
--pinnedpubkeyneeds a value not in the simulator yetExplanation to come
-
--post301not in the simulator yetExplanation to come
-
--post302not in the simulator yetExplanation to come
-
--post303not in the simulator yetExplanation to come
-
--preproxyneeds a value not in the simulator yetExplanation to come
-
-#, --progress-barnot in the simulator yetExplanation to come
-
--protoneeds a value not in the simulator yetExplanation to come
-
--proto-defaultneeds a value not in the simulator yetExplanation to come
-
--proto-redirneeds a value not in the simulator yetExplanation to come
-
-x, --proxyneeds a value not in the simulator yetExplanation to come
-
--proxy-anyauthnot in the simulator yetExplanation to come
-
--proxy-basicnot in the simulator yetExplanation to come
-
--proxy-ca-nativenot in the simulator yetExplanation to come
-
--proxy-cacertneeds a value not in the simulator yetExplanation to come
-
--proxy-capathneeds a value not in the simulator yetExplanation to come
-
--proxy-certneeds a value not in the simulator yetExplanation to come
-
--proxy-cert-typeneeds a value not in the simulator yetExplanation to come
-
--proxy-ciphersneeds a value not in the simulator yetExplanation to come
-
--proxy-crlfileneeds a value not in the simulator yetExplanation to come
-
--proxy-digestnot in the simulator yetExplanation to come
-
--proxy-headerneeds a value not in the simulator yetExplanation to come
-
--proxy-http2not in the simulator yetExplanation to come
-
--proxy-insecurenot in the simulator yetExplanation to come
-
--proxy-keyneeds a value not in the simulator yetExplanation to come
-
--proxy-key-typeneeds a value not in the simulator yetExplanation to come
-
--proxy-negotiatenot in the simulator yetExplanation to come
-
--proxy-ntlmnot in the simulator yetExplanation to come
-
--proxy-passneeds a value not in the simulator yetExplanation to come
-
--proxy-pinnedpubkeyneeds a value not in the simulator yetExplanation to come
-
--proxy-service-nameneeds a value not in the simulator yetExplanation to come
-
--proxy-ssl-allow-beastnot in the simulator yetExplanation to come
-
--proxy-ssl-auto-client-certnot in the simulator yetExplanation to come
-
--proxy-tls13-ciphersneeds a value not in the simulator yetExplanation to come
-
--proxy-tlsauthtypeneeds a value not in the simulator yetExplanation to come
-
--proxy-tlspasswordneeds a value not in the simulator yetExplanation to come
-
--proxy-tlsuserneeds a value not in the simulator yetExplanation to come
-
--proxy-tlsv1not in the simulator yetExplanation to come
-
-U, --proxy-userneeds a value not in the simulator yetExplanation to come
-
--proxy1.0needs a value not in the simulator yetExplanation to come
-
-p, --proxytunnelnot in the simulator yetExplanation to come
-
--pubkeyneeds a value not in the simulator yetExplanation to come
-
-Q, --quoteneeds a value not in the simulator yetExplanation to come
-
--random-fileneeds a value not in the simulator yetExplanation to come
-
-r, --rangeneeds a value not in the simulator yetExplanation to come
-
--ratenot in the simulator yetExplanation to come
-
--rawnot in the simulator yetExplanation to come
-
-e, --refererneeds a value not in the simulator yetExplanation to come
-
-J, --remote-header-namenot in the simulator yetExplanation to come
-
--remote-name-allnot in the simulator yetExplanation to come
-
-R, --remote-timenot in the simulator yetExplanation to come
-
--remove-on-errornot in the simulator yetExplanation to come
-
-X, --requestneeds a value not in the simulator yetExplanation to come
-
--request-targetneeds a value not in the simulator yetExplanation to come
-
--resolveneeds a value not in the simulator yetExplanation to come
-
--retryneeds a value not in the simulator yetExplanation to come
-
--retry-all-errorsnot in the simulator yetExplanation to come
-
--retry-connrefusednot in the simulator yetExplanation to come
-
--retry-delayneeds a value not in the simulator yetExplanation to come
-
--retry-max-timeneeds a value not in the simulator yetExplanation to come
-
--sasl-authzidneeds a value not in the simulator yetExplanation to come
-
--sasl-irnot in the simulator yetExplanation to come
-
--service-nameneeds a value not in the simulator yetExplanation to come
-
--sigalgsneeds a value not in the simulator yetExplanation to come
-
--skip-existingnot in the simulator yetExplanation to come
-
--socks4needs a value not in the simulator yetExplanation to come
-
--socks4aneeds a value not in the simulator yetExplanation to come
-
--socks5needs a value not in the simulator yetExplanation to come
-
--socks5-basicnot in the simulator yetExplanation to come
-
--socks5-gssapinot in the simulator yetExplanation to come
-
--socks5-gssapi-necnot in the simulator yetExplanation to come
-
--socks5-gssapi-serviceneeds a value not in the simulator yetExplanation to come
-
--socks5-hostnameneeds a value not in the simulator yetExplanation to come
-
-Y, --speed-limitneeds a value not in the simulator yetExplanation to come
-
-y, --speed-timeneeds a value not in the simulator yetExplanation to come
-
--sslnot in the simulator yetExplanation to come
-
--ssl-allow-beastnot in the simulator yetExplanation to come
-
--ssl-auto-client-certnot in the simulator yetExplanation to come
-
--ssl-no-revokenot in the simulator yetExplanation to come
-
--ssl-reqdnot in the simulator yetExplanation to come
-
--ssl-revoke-best-effortnot in the simulator yetExplanation to come
-
--ssl-sessionsneeds a value not in the simulator yetExplanation to come
-
-2, --sslv2not in the simulator yetExplanation to come
-
-3, --sslv3not in the simulator yetExplanation to come
-
--stderrneeds a value not in the simulator yetExplanation to come
-
--styled-outputnot in the simulator yetExplanation to come
-
--suppress-connect-headersnot in the simulator yetExplanation to come
-
--tcp-fastopennot in the simulator yetExplanation to come
-
--tcp-nodelaynot in the simulator yetExplanation to come
-
-t, --telnet-optionneeds a value not in the simulator yetExplanation to come
-
--tftp-blksizeneeds a value not in the simulator yetExplanation to come
-
--tftp-no-optionsnot in the simulator yetExplanation to come
-
-z, --time-condneeds a value not in the simulator yetExplanation to come
-
--tls-earlydatanot in the simulator yetExplanation to come
-
--tls-maxneeds a value not in the simulator yetExplanation to come
-
--tls13-ciphersneeds a value not in the simulator yetExplanation to come
-
--tlsauthtypeneeds a value not in the simulator yetExplanation to come
-
--tlspasswordneeds a value not in the simulator yetExplanation to come
-
--tlsuserneeds a value not in the simulator yetExplanation to come
-
-1, --tlsv1not in the simulator yetExplanation to come
-
--tlsv1.0not in the simulator yetExplanation to come
-
--tlsv1.1not in the simulator yetExplanation to come
-
--tlsv1.2not in the simulator yetExplanation to come
-
--tlsv1.3not in the simulator yetExplanation to come
-
--tr-encodingnot in the simulator yetExplanation to come
-
--traceneeds a value not in the simulator yetExplanation to come
-
--trace-asciineeds a value not in the simulator yetExplanation to come
-
--trace-configneeds a value not in the simulator yetExplanation to come
-
--trace-idsnot in the simulator yetExplanation to come
-
--trace-timenot in the simulator yetExplanation to come
-
--unix-socketneeds a value not in the simulator yetExplanation to come
-
-T, --upload-fileneeds a value not in the simulator yetExplanation to come
-
--upload-flagsneeds a value not in the simulator yetExplanation to come
-
--urlneeds a value not in the simulator yetExplanation to come
-
--url-queryneeds a value not in the simulator yetExplanation to come
-
-B, --use-asciinot in the simulator yetExplanation to come
-
-u, --userneeds a value not in the simulator yetExplanation to come
-
-A, --user-agentneeds a value not in the simulator yetExplanation to come
-
--variableneeds a value not in the simulator yetExplanation to come
-
-v, --verbosenot in the simulator yetExplanation to come
-
-V, --versionnot in the simulator yetExplanation to come
-
--vlan-priorityneeds a value not in the simulator yetExplanation to come
-
--xattrnot in the simulator yetExplanation to come
Examples
$ curl -s shop.example.net/
<h1>shop</h1> Where you learn it
Lessons
- Who listens, and what answers Linux Basics, Module 9: Networking