Download files from the web non-interactively.
low risk
wget specializes in downloading and supports recursive website mirroring. Unlike curl it saves to a file by default. -c resumes interrupted downloads. -q suppresses output for scripts.
| Flag | Meaning |
|---|---|
-O | Save to a specific filename |
-c --continue | Resume a partially downloaded file |
-q --quiet | Silent mode |
-r --recursive | Download recursively (website mirroring) |
-P --directory-prefix | Set download directory |
wget -c https://releases.ubuntu.com/22.04/ubuntu-22.04.4-live-server-amd64.isoDownload Ubuntu ISO with resume support · explain & risk-check →wget -q -O - https://example.com/install.sh | bashDownload and pipe install script to bash silently · explain & risk-check →wget --spider https://example.com/fileCheck if URL exists without downloading · explain & risk-check →Use `wget --spider` to check if a URL exists without downloading — perfect for health check scripts.
Reference text is hand-written and may be incomplete — check man wget for your version. Test destructive commands on a non-production system first.