wget — Non-interactive network downloader for HTTP, HTTPS, and FTP across all 5 shells
Equivalents in every shell
wget https://example.com/file.zipwget https://example.com/file.zipwget https://example.com/file.zipInvoke-WebRequest https://example.com/file.zip -OutFile file.zipIn Windows PowerShell 5.1, `wget` is also an alias for `Invoke-WebRequest`. In PowerShell 7+ the alias is removed.
curl -O https://example.com/file.zipNo native wget on Windows. Use `curl` (built-in since Windows 10 1803) or install GNU wget separately.
Worked examples
Download a single file (keep original filename)
wget https://example.com/file.zipInvoke-WebRequest https://example.com/file.zip -OutFile file.zipcurl -O https://example.com/file.zipResume a partial download
wget -c https://example.com/big.isoStart-BitsTransfer -Source https://example.com/big.iso -Destination big.iso -Resumecurl -C - -O https://example.com/big.isoMirror an entire website
wget -m -k -p https://example.com# No direct equivalent — script with Invoke-WebRequest + link extraction, or install GNU wget for Windows.Gotchas
- macOS does not ship wget; install via Homebrew (`brew install wget`) or use the built-in `curl -O`.
- `Start-BitsTransfer` (PowerShell) handles resumable / background downloads better than `Invoke-WebRequest`, but only on Windows.
- Recursive mirroring (`-m`, `-r`) is a wget specialty — `curl` cannot follow links; reach for `wget` or `httrack` instead.
WSL & PowerShell Core notes
Common tasks using wget
- Check if a URL is reachable
Test whether a URL returns 2xx/3xx — useful for healthchecks, wait-for-it scripts, and CI smoke tests.
- Download a file from a URL
Save a remote file to disk via HTTP/HTTPS, with progress and resume where supported.
- Follow HTTP redirects
Print the redirect chain (301/302/303/307/308 hops) from a starting URL to its final 2xx destination.
- Get HTTP response headers
Inspect just the response headers of a URL — useful for debugging redirects, caching, CORS, and TLS.
- Parse a URL into its scheme, host, port, path, and query
Extract individual pieces of a URL (scheme, userinfo, host, port, path, query, fragment) — for log parsing, building tooling that rewrites endpoints, splitting connection strings, or generating routing tables from a manifest.
- Send an HTTP POST request
POST a JSON body (or form fields, or a file) to a URL and capture the response.
- Serve the current directory over HTTP
Spin up a throwaway HTTP server that exposes the current directory — for ad-hoc file sharing, local QA, and sending a static build over your LAN.