wget https://example.com/file.txtDownloads a single file from a URL and saves it to the current directory.
A non-interactive downloader for HTTP, HTTPS and FTP that can resume, retry and mirror entire websites recursively.
sudo apt install wgetwget https://example.com/file.txtDownloads a single file from a URL and saves it to the current directory.
wget -O output.txt https://example.com/file.php?id=1Downloads a file and saves it with a specific custom filename.
Example
wget -O custom_name.txt https://example.com/dynamic_filewget -P /tmp/downloads https://example.com/image.jpgDownloads a file and saves it to a specific directory path.
Example
wget -P /var/www/html https://example.com/asset.pngwget -i urls.txtDownloads multiple files sequentially from a list of URLs contained in a text file.
Example
wget -i list_of_targets.txtwget --no-clobber https://example.com/file.zipSkips the download if the file already exists locally.
Example
wget -nc https://example.com/dataset.zipwget -c https://example.com/large.isoResumes a partially downloaded file from where it left off.
Example
wget --continue https://example.com/backup.tar.gzwget -B https://example.com/ -i relative_urls.txtResolves relative URLs in an input file against a specified base URL.
Example
wget --base=https://site.com/ -i paths.txtwget --tries=10 https://example.com/unstable.fileSets the maximum number of retries for a failed download attempt.
Example
wget -t 5 https://example.com/api/datawget --tries=inf https://example.com/critical.serviceRetries the download infinitely until successful.
Example
wget -t 0 https://example.com/streamwget --timeout=60 https://example.com/slow.resourceSets the network read timeout in seconds to prevent hanging connections.
Example
wget -T 30 https://example.com/large_querywget --connect-timeout=10 https://example.comSets the timeout specifically for the initial connection establishment.
Example
wget --connect-timeout=5 https://192.168.1.50wget --waitretry=5 https://example.com/fileWaits for a specified number of seconds between retry attempts.
Example
wget --waitretry=10 https://example.com/apiwget -o download.log https://example.com/file.txtRedirects all operational messages and errors to a log file instead of stdout.
Example
wget -o session.log https://example.com/datawget -a download.log https://example.com/file2.txtAppends operational messages to an existing log file.
Example
wget -a history.log https://example.com/updatewget -q https://example.com/silent_script.shRuns in quiet mode with absolutely no output to the terminal.
Example
wget --quiet https://example.com/installerwget -nv https://example.com/report.pdfRuns in non-verbose mode, printing only basic status lines and errors.
Example
wget --no-verbose https://example.com/daily_briefwget -b https://example.com/huge_dataset.csvGoes to background immediately after startup and writes output to wget-log.
Example
wget --background https://example.com/backup.sqlwget --progress=bar:force https://example.com/fileForces a specific type of progress bar display even if stderr is not a terminal.
Example
wget --progress=dot https://example.com/filewget --limit-rate=200k https://example.com/movie.mp4Limits the download speed to 200 kilobytes per second to save bandwidth.
Example
wget --limit-rate=500k https://example.com/isowget -w 10 https://example.com/fileWaits the specified number of seconds between multiple file retrievals.
Example
wget --wait=20 https://example.com/scrapewget --random-wait -w 10 -i list.txtWaits a random interval between 0.5 and 1.5 times the specified wait value to simulate human behavior.
Example
wget --random-wait --wait=5 -i urls.txtwget --bind-address=192.168.1.5 https://example.comBinds the client socket to a specific local IP address on a multi-interface system.
Example
wget --bind-address=10.0.0.2 https://internal.labwget -4 https://example.comForces the connection to use IPv4 addresses only.
Example
wget --inet4-only https://example.comwget -6 https://example.comForces the connection to use IPv6 addresses only.
Example
wget --inet6-only https://example.comwget --no-dns-cache https://example.comDisables DNS caching to force a new lookup for every request.
Example
wget --no-dns-cache https://dynamic-dns.comwget --user-agent="Mozilla/5.0" https://example.comSpoofs the User-Agent header to identify as a specific browser or bot.
Example
wget -U "Googlebot/2.1" https://example.comwget --header="Accept: application/json" https://example.com/apiAdds a custom HTTP header to the request.
Example
wget --header="X-Admin: true" https://example.com/adminwget --referer="https://google.com" https://example.com/hiddenSets the HTTP Referer header to simulate clicking a link from another site.
Example
wget --referer="http://trusted.com" https://target.comwget --user=admin --password=secret https://example.com/protectedUses basic HTTP authentication with provided username and password.
Example
wget --user=deploy --password=pass https://staging.comwget --ask-password --user=admin https://example.com/protectedPrompts the user to enter the password interactively to avoid recording it in history.
Example
wget --ask-password --user=root https://secure.labwget --auth-no-challenge --user=admin --password=pass https://example.comSends authentication credentials immediately without waiting for a server challenge.
Example
wget --auth-no-challenge --user=user --password=pass https://api.comwget --header="Authorization: Bearer <token>" https://api.example.com/v1/dataAuthenticates using a Bearer token in the Authorization header.
Example
wget --header="Authorization: Bearer xyz123" https://api.lab/userwget --http-user=user --http-password=pass https://example.comExplicitly sets HTTP authentication separate from FTP authentication options.
Example
wget --http-user=admin --http-password=123 https://router.localwget --ftp-user=user --ftp-password=pass ftp://example.comExplicitly sets FTP authentication separate from HTTP authentication options.
Example
wget --ftp-user=anon --ftp-password=anon ftp://public.ftpwget --save-cookies cookies.txt --keep-session-cookies https://example.com/loginSaves the cookies received from the server, including session cookies, to a file.
Example
wget --save-cookies session.txt https://example.com/authwget --load-cookies cookies.txt https://example.com/dashboardLoads cookies from a file to maintain a session across multiple requests.
Example
wget --load-cookies session.txt https://example.com/profilewget -e use_proxy=yes -e http_proxy=127.0.0.1:8080 https://example.comConfigures a specific HTTP proxy for the connection using command line execution.
Example
wget -e http_proxy=10.10.10.5:3128 https://external.comwget --proxy-user=user --proxy-password=pass https://example.comProvides credentials for authenticating with the proxy server itself.
Example
wget --proxy-user=corp --proxy-password=secret https://internet.comwget --no-proxy https://internal.example.comExplicitly bypasses proxy settings for specific requests.
Example
wget --no-proxy https://localhostwget --no-proxy --header="Host: internal.test" https://127.0.0.1Directly accesses a localhost service with a spoofed Host header, bypassing proxies.
Example
wget --no-proxy https://10.0.0.1wget --no-check-certificate https://self-signed.localSkips SSL certificate validation, useful for self-signed certificates in labs.
Example
wget --no-check-certificate https://192.168.1.1wget --secure-protocol=TLSv1_2 https://example.comForces the connection to use a specific version of the TLS protocol.
Example
wget --secure-protocol=TLSv1_3 https://secure.comwget --certificate=client.pem --private-key=key.pem https://mtls.example.comUses a client-side certificate and private key for mutual TLS (mTLS) authentication.
Example
wget --certificate=cert.crt --private-key=key.key https://secure-api.comwget --ca-certificate=rootCA.pem https://internal.labVerifies the server's certificate against a specific custom CA file.
Example
wget --ca-certificate=company-ca.crt https://intranet.comwget --secure-protocol=PFS https://example.comEnforces Perfect Forward Secrecy or allows automatic protocol negotiation.
Example
wget --secure-protocol=auto https://example.comwget --https-only -r https://example.comWhen recurring, only follows links that use the HTTPS protocol.
Example
wget --https-only -m https://site.comwget -r https://example.com/directory/Recursively downloads files and subdirectories from the specified URL.
Example
wget --recursive https://example.com/files/wget -r -l 2 https://example.comRecursively downloads with a maximum depth limit.
Example
wget --level=3 -r https://example.comwget -m https://example.comMirrors a website (enables recursion, time-stamping, and infinite depth).
Example
wget --mirror https://example.comwget -r -k https://example.comRecursively downloads and converts links to point to local files for offline viewing.
Example
wget -r --convert-links https://example.comwget -p https://example.com/page.htmlDownloads all files necessary to display the HTML page (images, CSS, JS).
Example
wget --page-requisites https://example.com/articlewget -mpk https://example.comCombines mirror, page requisites, and link conversion for a complete offline backup.
Example
wget --mirror --page-requisites --convert-links https://example.comwget -r --level=inf https://example.comRecurses with infinite depth (use with extreme caution).
Example
wget -r -l 0 https://example.comwget -r --accept-regex 'index\.(html|php)' https://example.comRecursively downloads only index files or specific dynamic pages via regex.
Example
wget -r --accept-regex 'view\?id=' https://example.comwget -r --delete-after https://example.comDownloads files recursively to warm up a cache or test throughput, then deletes them.
Example
wget -r --delete-after https://cache-warmer.comwget -r -k -p -E https://example.comThe most robust set of flags for ensuring a mirrored HTML page renders correctly offline.
Example
wget --recursive --convert-links --page-requisites --adjust-extension https://example.comwget -r -nd https://example.com/files/Recursively downloads files but saves them all to the current directory, flattening the structure.
Example
wget -r --no-directories https://example.com/assets/wget -r --no-parent https://example.com/pub/data/Recursively downloads but prevents ascending to parent directories.
Example
wget -r -np https://example.com/files/user/wget -r --no-host-directories https://example.comRecursively downloads but skips creating a directory named after the hostname.
Example
wget -r -nH https://example.comwget -r --no-host-directories --cut-dirs=1 https://example.com/user/files/Combines host skipping and directory cutting for a clean local folder structure.
Example
wget -r -nH --cut-dirs=2 https://example.com/a/b/c/wget -r -A pdf,docx https://example.com/documents/Recursively downloads only files matching the specified extensions.
Example
wget -r --accept=jpg,png https://example.com/gallery/wget -r -R index.html,robots.txt https://example.comRecursively downloads while explicitly excluding specified filenames or extensions.
Example
wget -r --reject=tmp,bak https://example.com/backupwget -r --accept-regex "/2023/.*\.pdf" https://example.com/archive/Uses a regular expression to filter which URLs should be downloaded during recursion.
Example
wget -r --accept-regex "user-[0-9]+" https://example.com/userswget --ignore-case -A JPEG,jpg https://example.com/photosMatches file extensions case-insensitively during filtering.
Example
wget --ignore-case -A PDF https://example.com/docswget --post-data="id=5&action=delete" https://example.com/api.phpSends data to the server using the HTTP POST method.
Example
wget --post-data="user=admin" https://example.com/loginwget --post-file=payload.json --header="Content-Type: application/json" https://example.com/apiUploads the contents of a file via HTTP POST with appropriate headers.
Example
wget --post-file=soap.xml https://example.com/servicewget --method=PUT --body-file=update.json https://example.com/resource/1Uses a specific HTTP verb (like PUT or DELETE) to interact with RESTful APIs.
Example
wget --method=DELETE https://example.com/resource/1wget --content-disposition https://example.com/download?id=123Honors the Content-Disposition header sent by the server to name the saved file.
Example
wget --content-disposition https://example.com/get/filewget --spider https://example.com/fileChecks if the file exists without downloading it (HEAD request).
Example
wget --spider -r https://example.comwget -O - https://example.com/script.sh | bashDownloads a file to standard output for immediate piping into another command.
Example
wget -O - https://example.com/key.pub | apt-key add -wget ftp://user:password@ftp.example.com/file.txtDownloads a file using the FTP protocol with authentication.
Example
wget ftp://anonymous:test@ftp.example.com/pub/filewget --glob=on ftp://ftp.example.com/pub/*.txtUses wildcard globbing to download multiple files via FTP.
Example
wget --glob=on ftp://server/logs/log_*.txtwget --no-passive-ftp ftp://ftp.example.com/fileForces active FTP mode instead of passive mode.
Example
wget --no-passive-ftp ftp://internal/filewget --spider -r -nd --no-parent https://example.com 2>&1 | grep 'Broken link'Crawls a site without downloading to identify broken links and potential hijackable assets.
Example
wget --spider -r https://target.com 2>&1 | grep '404'wget -r -l 5 --spider --force-html -i input.htmlForces wget to treat an input file as HTML to parse and follow links within it.
Example
wget --spider --force-html -i list.htmlwget --user-agent=" " https://example.comSends an empty User-Agent string to test server behavior for unknown clients.
Example
wget -U "" https://example.comwget --header="X-Forwarded-For: 127.0.0.1" https://example.comInjects headers attempting to bypass IP-based access controls.
Example
wget --header="Client-IP: 127.0.0.1" https://example.comwget --execute robots=off -r https://example.com/adminIgnores the robots.txt file to crawl paths specifically disallowed by the administrator.
Example
wget -e robots=off -m https://target.comwget -r -A config,conf,cfg,ini,env,sh,bak,sql https://example.comRecursively scans for sensitive configuration and backup files left on the server.
Example
wget -r -A bak,old,swp https://example.comwget --spider --no-check-certificate https://192.168.1.1/adminProbes an internal IP endpoint for existence ignoring SSL errors.
Example
wget --spider --no-check-certificate https://10.0.0.1/configwget --method=OPTIONS -S https://example.comSends an HTTP OPTIONS request to discover allowed methods on the server.
Example
wget --method=OPTIONS -S https://api.target.comwget --method=TRACE -S https://example.comSends a TRACE request to debug upstream proxies or test for Cross-Site Tracing (XST).
Example
wget --method=TRACE https://example.comwget --warc-file=evidence --warc-cdx -m https://malicious-site.comMirrors a site and saves the request/response data into a WARC archive for forensic evidence.
Example
wget --warc-file=case_101 -m https://example.comwget --server-response --spider https://example.comPrints the full HTTP headers sent by the server to analyze security headers.
Example
wget -S --spider https://example.comwget --timestamping https://example.com/daily_log.txtDownloads the file only if the server version is newer than the local version.
Example
wget -N https://example.com/database.dbwget --preserve-permissions https://example.com/script.shPreserves the file permissions of the downloaded file as they are on the remote server.
Example
wget --no-use-server-timestamps https://example.com/filewget --max-redirect=0 https://example.com/redirectPrevents wget from following redirects to analyze the initial redirect destination.
Example
wget --max-redirect=0 https://phishing.linkwget --content-on-error https://example.com/error_pageSaves the body of the response even if the server returns a 4xx or 5xx error code.
Example
wget --content-on-error https://example.com/api/404wget --no-cache https://example.com/live_dataEnsures the server sends a fresh version of the data rather than a cached copy.
Example
wget --header="Pragma: no-cache" https://example.comwget --local-encoding=UTF-8 --remote-encoding=ISO-8859-1 https://example.comHandles encoding differences between the local system and the remote server.
Example
wget --remote-encoding=Windows-1252 https://legacy.comwget --unlink https://example.com/fileUnlinks (deletes) the file before writing the new download, preventing symlink attacks.
Example
wget --unlink -r https://example.comwget --backups=1 https://example.com/config.xmlRotates existing files by adding a .1 suffix instead of overwriting them.
Example
wget --backups=3 https://example.com/settings.jsonwget --inet4-only --bind-address=127.0.0.1 https://localhost/testCombinatory command forcing IPv4 and a specific interface binding.
Example
wget -4 --bind-address=10.0.0.5 https://example.comwget --load-cookies=cookies.txt --post-data "download=true" -O - https://example.com/export | gzip > dump.gzAuthenticates, requests a POST export, streams to stdout, and compresses immediately.
Example
wget --load-cookies=auth.txt -O - https://site.com/stream | tar -xvf -wget -r -l 1 --no-parent -A.txt -H -D example.com,cdn.example.com https://example.comRecursively downloads with host spanning enabled but restricted to specific domains.
Example
wget -r -H -D site.com,img.site.com https://site.comwget --regex-type=posix --accept-regex '.*\.(jpg|png)' https://example.comSpecifies the regular expression type (POSIX or PCRE) for advanced filtering.
Example
wget --regex-type=pcre --reject-regex 'logout' https://example.comwget --no-if-modified-since https://example.com/dataForces a download even if the server claims the file has not been modified.
Example
wget --no-if-modified-since -N https://example.comwget --crl-file=crl.pem https://secure.example.comChecks the server certificate against a Certificate Revocation List (CRL).
Example
wget --crl-file=revoked.crl https://internal.labwget --random-wait --limit-rate=100k --user-agent="Mozilla/5.0" -e robots=off -m https://example.comA 'stealthy' mirror workflow attempting to evade detection by acting like a slow human browser.
Example
wget --random-wait -w 3 -e robots=off -r https://target.comwget -O /dev/null https://example.com/speedtest.binDownloads a file and discards it immediately to test network throughput.
Example
wget -O /dev/null https://example.com/10GB.zipwget --force-directories -i list.txtForces the creation of a hierarchy of directories even if one would not normally be created.
Example
wget -x -i urls.txtwget --protocol-directories -r https://example.comUses the protocol name as a directory component when saving files locally.
Example
wget --protocol-directories -r https://cdn.comwget --cut-dirs=2 -r https://example.com/dir1/dir2/data/Ignores the specified number of parent directory components when saving files.
Example
wget --cut-dirs=1 -r https://example.com/pub/files/wget --adjust-extension -r https://example.com/cgi-bin/scriptAppends the proper extension (like .html) to files downloaded with unknown content types.
Example
wget -E -r https://example.com/dynamicwget --restrict-file-names=windows https://example.com/aux.txtEscapes characters in filenames to ensure compatibility with specific operating systems.
Example
wget --restrict-file-names=unix https://example.com/filewget --mirror --convert-links --adjust-extension --page-requisites --no-parent https://example.com/wiki/The ultimate 'make a local copy of this documentation section' command.
Example
wget -mkEpnp https://example.com/docs/wget --header="Cookie: session=123" https://example.com/adminManually sets the Cookie header without loading from a file.
Example
wget --header="Cookie: id=abc" https://example.comwget --start-pos=1000 https://example.com/file.txtStarts the download from a specific byte offset.
Example
wget --start-pos=500k https://example.com/video.mp4wget --no-cookies --header "Cookie: auth=token" https://example.comPrevents wget from using its internal cookie jar, relying manual headers.
Example
wget --no-cookies https://example.comwget --body-data="param=value" --method=POST https://example.com/apiAlternative way to send data strings with specific methods.
Example
wget --body-data="json={}" --method=POST https://example.comwget --compression=auto https://example.com/dataAsks the server to compress the response (gzip) to save bandwidth.
Example
wget --compression=gzip https://example.com/datawget -d https://example.comPrints extensive debug output to the terminal (requires wget compiled with debug support).
Example
wget --debug https://example.comwget -r --exclude-domains facebook.com,twitter.com https://example.comFollows links but explicitly avoids downloading content from specific excluded domains.
Example
wget -r --exclude-domains google.com https://blog.comwget -r --follow-tags=a,img,link https://example.comOnly parses and follows links found within specific HTML tags.
Example
wget -r --follow-tags=script https://example.comwget -r --ignore-tags=area,form https://example.comParses the document but ignores links found within specific HTML tags.
Example
wget -r --ignore-tags=script https://example.comwget --span-hosts -r https://example.comAllows recursion to jump to foreign hosts (use with caution and filters).
Example
wget -H -r https://example.comwget --no-http-keep-alive https://example.comDisables HTTP Keep-Alive, forcing a new TCP connection for every file.
Example
wget --no-http-keep-alive -i urls.txtwget -O- https://example.com/logs.txt | grep errorUses standard output strictly for piping data into text processing tools.
Example
wget -O- https://example.com/data | awk '{print $1}'wget --ask-password --output-file=/dev/stderr https://example.com/secretForces log output to standard error specifically.
Example
wget -o /dev/stderr https://example.comwget --retry-connrefused -t 5 https://example.comConsiders 'Connection Refused' as a transient error and retries.
Example
wget --retry-connrefused https://flaky-server.comwget --no-verbose --show-progress https://example.com/fileKeeps the log quiet but still displays the progress bar on the terminal.
Example
wget -nv --show-progress https://example.com/isowget --ciphers=DEFAULT:!AES https://example.comSpecifies the GnuTLS cipher priority string to test server SSL/TLS configurations.
Example
wget --ciphers=ECDHE-RSA-AES256-GCM-SHA384 https://example.comwget --no-hsts https://example.comPrevents wget from creating or updating the HSTS (HTTP Strict Transport Security) database file.
Example
wget --no-hsts https://secure.comTransfers data with URLs over HTTP, FTP and many other protocols. Indispensable for testing APIs, headers and authentication.
A human-friendly HTTP client with intuitive syntax, JSON support and coloured output — great for exploring APIs.
The TCP/IP Swiss-army knife: connect to and listen on ports, transfer files, banner-grab and catch reverse shells.
A bidirectional data relay between almost any two endpoints — sockets, files, pipes, TLS — ideal for port forwarding and stable shells.