↑↓ move Enter open Esc close

How to Download a File with wget in Linux

Download files from HTTP or HTTPS with wget and save them to a chosen location.

wget is designed around unattended downloads and is especially convenient in shell scripts. Its defaults are simple: provide a URL and it writes the response to a local file.

Step by step

1 Download a file

$ wget https://example.com/file.tar.gz

Downloads the URL into the current directory.

2 Choose the output filename

$ wget -O release.tar.gz https://example.com/download

The -O option writes the response to the exact path you specify.

3 Continue a partial download

$ wget -c https://example.com/large.iso

The -c option resumes an existing partial file when the server supports range requests.

4 Download quietly in a script

$ wget -q -O release.tar.gz https://example.com/release

Quiet mode reduces terminal output while the explicit destination makes the result predictable.

Tips worth knowing

Frequently asked questions

How do I download a file with wget?

Use `wget URL`.

How do I rename the downloaded file?

Use `wget -O local-name URL`.

Can wget resume downloads?

Yes, `wget -c URL` can continue a partial download when the server supports it.

The commands behind it

More how-to guides