curl https://example.comPerforms a standard GET request to the specified URL and prints the response to stdout.
Transfers data with URLs over HTTP, FTP and many other protocols. Indispensable for testing APIs, headers and authentication.
sudo apt install curlcurl https://example.comPerforms a standard GET request to the specified URL and prints the response to stdout.
curl -v https://example.comEnables verbose mode to display request and response headers along with the handshake.
curl -I https://example.comFetches only the HTTP headers using a HEAD request.
curl -i https://example.comIncludes the HTTP response headers in the output before the response body.
curl --helpDisplays the summary of curl options and usage categories.
curl -O https://example.com/file.zipDownloads the file and saves it using the remote filename.
curl -o output.html https://example.comSaves the response output to a specifically named local file.
curl -C - -O https://example.com/large.isoResumes a specific file download from where it was interrupted.
curl -X POST https://api.local/resourceSends an HTTP POST request with no data payload.
curl -X DELETE https://api.local/resource/1Sends an HTTP DELETE request to remove a resource.
curl -X PUT -d "new data" https://api.local/resource/1Sends an HTTP PUT request to update or create a resource with data.
curl -X PATCH -d "update" https://api.local/resource/1Sends an HTTP PATCH request to partially update a resource.
curl -X OPTIONS https://api.local/resourceSends an OPTIONS request to determine allowed methods on the server.
curl -d "param1=value1¶m2=value2" https://example.com/loginSends data as application/x-www-form-urlencoded in a POST request.
curl --data-urlencode "name=John Doe" https://example.com/submitAutomatically URL-encodes the provided data field before sending.
curl -H "Content-Type: application/json" -d '{"key":"value"}' https://api.localSends a raw JSON payload with the correct Content-Type header.
curl --data-binary @filename.bin https://example.com/uploadPosts the exact binary content of a file without processing.
curl -F "profile=@portrait.jpg" -F "name=User" https://example.com/uploadSubmits a multipart/form-data request simulating a file upload form.
curl -F "file=@local.txt;filename=remote.txt" https://example.comUploads a file via multipart form but renames it for the server.
curl --json '{"key": "value"}' https://example.comShortcut (curl 7.82+) that sets Content-Type: application/json and Accept: application/json.
curl -G -d "q=search" -d "page=1" https://example.com/apiForces a GET request and appends data parameters to the URL query string.
curl -H "X-Custom-Header: value" https://example.comSends a custom HTTP header with the request.
curl -A "Mozilla/5.0" https://example.comSpoofs the User-Agent string to identify as a web browser.
curl -e "https://google.com" https://example.comSets the Referer header to simulate navigation from another site.
curl -H "Host: internal.local" https://192.168.1.10Manually sets the Host header, useful for virtual host discovery.
curl --header "X-Header:@file.txt" https://example.comReads the header value from a file (stripping newlines).
curl -u username:password https://example.comPerforms Basic Authentication using a username and password.
curl -u username https://example.comPrompts the user interactively for the password for Basic Auth.
curl -H "Authorization: Bearer <token>" https://api.localAuthenticates using a Bearer token in the header.
curl --digest -u user:pass https://example.comUses Digest authentication instead of Basic.
curl --ntlm -u user:pass https://example.comUses NTLM authentication, common in Windows environments.
curl --negotiate -u : https://example.comUses GSS-API/SPNEGO Negotiate auth, often for Kerberos.
curl --aws-sigv4 "aws:amz:region:service" --user "key:secret" https://api.amazonaws.comSigns the request using AWS Signature Version 4.
curl -x http://proxy.local:8080 https://example.comRoutes the request through an HTTP proxy.
curl -x socks5://proxy.local:1080 https://example.comRoutes the request through a SOCKS5 proxy.
curl --proxy-user user:pass -x http://proxy.local:8080 https://example.comAuthenticates to the proxy server using Basic auth.
curl --noproxy "*" https://internal.localBypasses configured proxies for specific hosts or all hosts.
curl --proxytunnel -x http://proxy.local:8080 https://example.comUses the CONNECT method to tunnel SSL through an HTTP proxy.
curl --proxy-insecure -x https://proxy.local https://example.comConnects to an HTTPS proxy ignoring its certificate errors.
curl -k https://self-signed.localAllows insecure connections to sites with invalid or self-signed SSL certificates.
curl --cert client.pem --key key.pem https://secure.localAuthenticates using a client-side certificate and private key.
curl --cacert ca-bundle.crt https://example.comVerifies the server using a specific CA certificate bundle.
curl --tlsv1.2 https://example.comForces the connection to use TLS version 1.2.
curl --tlsv1.3 https://example.comForces the connection to use TLS version 1.3.
curl --ciphers ECDHE-RSA-AES256-GCM-SHA384 https://example.comSpecifies exactly which cipher suite to use for the TLS handshake.
curl --pinnedpubkey sha256//hashvalue https://example.comEnforces SSL pinning by requiring the server key to match the provided hash.
curl --compressed https://example.comRequests a compressed response (gzip/brotli) and decompresses it automatically.
curl --no-keepalive https://example.comDisables TCP keep-alive to force a new connection for the request.
curl --limit-rate 100k https://example.com/largefileThrottles the download speed to 100 kilobytes per second.
curl --connect-timeout 5 https://example.comAborts if the connection to the server takes longer than 5 seconds.
curl -m 20 https://example.comSets the maximum total time allowed for the entire operation to 20 seconds.
curl --retry 3 --retry-delay 5 https://unstable.localRetries the request up to 3 times with a 5-second delay on transient errors.
curl --ipv4 https://example.comForces curl to resolve the name to an IPv4 address only.
curl --ipv6 https://example.comForces curl to resolve the name to an IPv6 address only.
curl --interface eth0 https://example.comBinds the connection to a specific network interface.
curl --resolve example.com:443:127.0.0.1 https://example.comManually forces the domain to resolve to a specific IP address for testing.
curl --http2 https://example.comForces the client to attempt an HTTP/2 connection.
curl --http2-prior-knowledge https://example.comIssues HTTP/2 requests immediately without an HTTP/1.1 upgrade handshake.
curl --http3 https://example.comForces the client to use HTTP/3 (QUIC) if supported by the build.
curl -s https://example.comEnables silent mode, suppressing the progress meter and error messages.
curl -sS https://example.comEnables silent mode but still outputs errors if they occur.
curl -w "Status: %{http_code}\n" https://example.comWrites a custom output format displaying the HTTP status code after completion.
curl -w "Time: %{time_total}\n" -o /dev/null -s https://example.comMeasures total request time while discarding the response body.
curl -w "DNS: %{time_namelookup} Connect: %{time_connect}\n" https://example.comProvides a breakdown of DNS resolution and TCP connection timing.
curl --dump-header headers.txt https://example.comSaves the HTTP response headers into a separate file.
curl -w "Type: %{content_type} Size: %{size_download}\n" https://example.comReports the content type and downloaded size after completion.
curl --trace dump.txt https://example.comPerforms a full hex dump of incoming and outgoing data for debugging.
curl --trace-ascii dump.txt https://example.comPerforms an ASCII dump of data traffic, easier to read than hex.
curl --trace-time -v https://example.comPrepends a timestamp to every line of verbose output.
curl --libcurl code.c https://example.comGenerates C source code equivalent to the command line usage.
curl --no-buffer https://example.comDisables output buffering to display data as fast as it arrives.
curl --fail-with-body https://example.com/apiReturns an error code on 400+ status but still saves the response body.
curl --path-as-is https://example.com/../../etc/passwdSends the path exactly as provided without dot-segment removal, for traversal testing.
curl -X PUT --upload-file shell.php https://vuln.local/uploads/Attempts to upload a file using the PUT method for vulnerability testing.
curl --request-target "*" -X OPTIONS https://example.comSends an OPTIONS request to the server root to check global supported methods.
curl -H "Host: malicious.com" -k https://target.comTests for Host Header Injection vulnerabilities.
curl -H "User-Agent: () { :;}; echo CVE-2014-6271" https://example.com/cgi-bin/testSends a Shellshock payload in the User-Agent header.
curl -I -s https://example.com | grep -i "Content-Security-Policy"Checks for the presence of the CSP security header.
curl -I -s https://example.com | grep -i "Strict-Transport-Security"Verifies that HSTS is enabled on the server.
curl -s -o /dev/null -w "%{ssl_verify_result}\n" https://example.comChecks the SSL verification result code (0 means success).
curl --doh-url https://cloudflare-dns.com/dns-query https://example.comUses DNS-over-HTTPS (DoH) to bypass local DNS filters or logging.
curl -v --header "Transfer-Encoding: chunked" --header "Content-Length: 10" https://example.comSends conflicting headers to test for Request Smuggling vulnerabilities.
curl ftp://user:pass@ftp.example.com/file.txtDownloads a file using the FTP protocol.
curl -T local.txt ftp://user:pass@ftp.example.com/upload/Uploads a file using FTP.
curl telnet://example.com:23Initiates a raw Telnet connection to the host.
curl smtp://mail.example.com --mail-from me@example.com --mail-rcpt you@example.com --upload-file mail.txtSends an email using the SMTP protocol.
curl ldap://ldap.example.com/dc=example,dc=comQueries an LDAP server.
curl pop3://pop.example.com -u user:passwordConnects to a POP3 server to check mail.
curl dict://dict.org/d:curlUses the DICT protocol to look up a word definition.
curl tftp://192.168.1.1/file.txtDownloads a file using TFTP (Trivial File Transfer Protocol).
curl -u user:key sftp://example.com/file.txtDownloads a file using SFTP (SSH File Transfer Protocol).
curl gopher://example.com/Connects to a server using the legacy Gopher protocol.
curl -s -f https://example.com/health || exit 1Fails silently (exit code 22) if the HTTP response is an error (4xx/5xx), suitable for pipelines.
curl --create-dirs -o /tmp/folder/file.txt https://example.comAutomatically creates the local directory structure if it does not exist.
curl -R -O https://example.com/file.zipSets the timestamp of the local file to match the remote file time.
curl -K config.txtReads arguments and URLs from a configuration file.
curl --url-query "name=val" https://example.comAppends a query parameter to the URL, handling encoding automatically (newer curl versions).
curl --haproxy-protocol https://example.comSends the HAProxy PROXY protocol header at the start of the connection.
curl --keepalive-time 10 https://example.comSets the interval for TCP keep-alive probes to 10 seconds.
curl --limit-rate 500B https://example.comSimulates extremely slow network conditions (500 bytes/sec).
curl --unix-socket /var/run/docker.sock http://localhost/infoConnects to an HTTP server listening on a Unix Domain Socket (e.g., Docker).
curl --stderr output.log https://example.comRedirects stderr (progress/errors) to a file instead of the terminal.
curl --oauth2-bearer "TOKEN" https://example.comSpecific flag for providing an OAuth 2.0 bearer token.
curl --tls13-ciphers TLS_AES_256_GCM_SHA384 https://example.comSpecifies cipher suites specifically for TLS 1.3 connections.
curl -v --trace-ids https://example.comAdds connection and transfer IDs to verbose output for tracking multiplexed streams.
curl --metalink file.metaDownloads files listed in a Metalink XML file (if supported).
curl --location-trusted -u user:pass https://example.comFollows redirects and forwards authentication credentials to the new host.
curl -Z -O https://example.com/file1 -O https://example.com/file2Performs parallel downloads of multiple URLs (requires libcurl with parallel support).
curl -s -I -X GET https://compromised.localSafely retrieves headers from a potentially compromised host without executing content.
curl --max-time 2 https://suspicious-ip.localProbes a suspicious IP with a hard timeout to avoid hanging on tar-pits.
curl -A "IncidentResponseBot/1.0" https://internal.logUses a specific User-Agent to tag traffic during an investigation.
curl --socks5-hostname localhost:9050 https://check.torproject.orgRoutes traffic through Tor, resolving DNS remotely via the SOCKS proxy.
curl --alt-svc altsvc.cache https://example.comUses the Alt-Svc cache to upgrade connections to HTTP/3 or HTTP/2.
curl --local-port 10000-11000 https://example.comForces the client to use a source port within a specific range.
curl -u user:pass scp://example.com/~/file.txtDownloads a file via SCP (Secure Copy Protocol).
curl --tlsuser user --tlspassword pass https://example.comProvides username/password for TLS-SRP authentication.
curl --speed-limit 1000 --speed-time 10 https://example.comAborts the download if speed drops below 1000 bytes/sec for 10 seconds.
curl --progress-bar -O https://example.com/large.zipDisplays a simple progress bar instead of the standard meter.
curl -I -X DELETE https://example.com/adminChecks if the DELETE method is enabled on a sensitive endpoint without executing it completely.
curl -K cleanup_config.txtRuns a batch of delete/logout commands defined in a config file.
curl -X POST -H "Content-Type: application/xml" -d "<xml>data</xml>" https://api.localSubmits an XML payload to a SOAP or XML-RPC endpoint.
curl -H "Range: bytes=0-18446744073709551615" https://example.comSends a malformed Range header to test for integer overflow vulnerabilities.
curl -s -w "%{remote_ip}" https://example.comOutputs only the remote IP address of the server connected to.
curl --proxy-header "Custom: Header" -x http://proxy.local https://example.comSends a custom header to the proxy server itself, not the destination.
curl --engine listLists available OpenSSL crypto engines supported by the build.
A non-interactive downloader for HTTP, HTTPS and FTP that can resume, retry and mirror entire websites recursively.
A human-friendly HTTP client with intuitive syntax, JSON support and coloured output — great for exploring APIs.
A lightweight command-line JSON processor: filter, transform and pretty-print JSON from APIs, logs and tool output.
The ubiquitous toolkit for TLS and general cryptography: inspect certificates, generate keys and CSRs, convert formats, hash, encrypt and create random secrets.
The TCP/IP Swiss-army knife: connect to and listen on ports, transfer files, banner-grab and catch reverse shells.