Wget Command Line Utility - Download Files

Learn to download files efficiently with the Wget command line utility. Explore options for resuming downloads and saving files with different names.

Wget Command Line Utility

Wget: Efficient File Downloading

Wget is a powerful command-line utility designed for downloading files from the web. It supports various protocols like HTTP, HTTPS, and FTP, making it a versatile tool for developers and system administrators. Its ability to resume interrupted downloads and save files with custom names enhances its usability.

Key Wget Options

Option Description
-O Download a file and save it under a different name.
-c Resume an interrupted download. If a download is stopped, Wget can pick up where it left off.

Wget Usage Examples

Here are some common examples of how to use Wget:

Downloading a File

To download a file, simply provide the URL to the wget command:

wget https://releases.ubuntu.com/21.10/ubuntu-21.10-desktop-amd64.iso

Resuming an Interrupted Download

If a download fails or is interrupted, you can use the -c option to resume it:

wget -c https://releases.ubuntu.com/21.10/ubuntu-21.10-desktop-amd64.iso

Downloading a File with a Specific Name

To save the downloaded file with a name different from its original name, use the -O option:

wget -O ubuntu-desktop.iso https://releases.ubuntu.com/21.10/ubuntu-21.10-desktop-amd64.iso

Further Resources