 |
|
| |
| Introduction
| |
Wget is a
command-line utility for downloading files over HTTP, HTTPS, and FTP. It is built for one job and does
it very well: retrieving content non-interactively — so it keeps working after you log out, can
resume an interrupted download, retries on a flaky connection, and can recurse through a site to
mirror it.
Wget is a close companion of cURL.
Use Wget when the goal is to download files — one file, a list of them, or an
entire directory tree. Use cURL when the goal is to interact with a service and read its
response.
| |
| Installation
| |
Check whether Wget is already present with wget --version. If not,
connect to your VPS, become root,
and install it:
On FreeBSD 15:
# pkg install wget
On Rocky Linux 10:
# dnf install wget
| |
| Downloading Files
| |
In its simplest form, Wget takes a URL and saves the file into the current directory under its
original name:
$ wget https://example.com/software-1.2.tar.gz
The options that come up most often handle the real-world cases — saving under a different
name, resuming a partial download, downloading a list of URLs, and running quietly in the background:
$ wget -O app.tar.gz https://example.com/download?id=42 # choose the output name
$ wget -c https://example.com/big.iso # -c resumes an interrupted download
$ wget -i urls.txt # fetch every URL listed in a file
$ wget -b https://example.com/big.iso # -b runs in the background (logs to wget-log)
| |
| Mirroring a Web Site
| |
Wget can download a site for offline viewing or for moving it to your VPS. The --mirror
shortcut turns on recursion, timestamping, and infinite depth; the companion options rewrite links and
pull in the page assets so the copy is usable locally:
$ wget --mirror --convert-links --adjust-extension \
--page-requisites --no-parent https://example.com/
|
NOTE: Recursive mirroring downloads a great many files and consumes bandwidth on
both ends. Use --no-parent to stay within a sub-directory, --wait=1 to pause
between requests, and please mirror only sites you own or have permission to copy. Always
check a site's terms before mirroring it.
|
| |
| Documentation
| |
The wget(1) manual page documents every option, and the GNU project publishes a complete
reference manual:
|
Toll Free 1-866-GSP-4400 • 1-301-464-9363 • service@gsp.com
Copyright © 1994-2026 GSP Services, Inc.
|