Terminal Dojo
Help العربية Sign inGet started

Command library / curl

curl

BashDraft — pending expert review3 practice missions

Fetch a URL from the command line

Transfers data to or from a URL — almost always used for HTTP. -I fetches headers only (fast, no body — great for checking what a server is without downloading anything), -o saves the response to a file, and -X sets the request method for anything other than a plain GET.

Practice curl

Usage

curl [-I] [-o file] [-X method] url

Options and flags

Examples

Common mistakes

curl -I -o headers.txt https://example.com curl -I https://example.com

This drill's answer is a quick header check straight to the screen — piping headers into a file is valid curl syntax, just not what this specific drill is asking for.

Related commands

digwhois