Linux Terminal Command: wget

The wget command is an essential tool in Network Utilities. In this tutorial, we will explore what wget does, look at everyday examples, and cover advanced options to supercharge your command-line workflow.


Concept & Explanation

The wget command downloads files from the web. It supports background downloads, downloads over proxy servers, and recursive directory scraping.


Common Options & Syntax

wget [options] [arguments]

Here are the most common flags used with wget:


1. Interactive Example (Simple)

Here is how most people run the command:

# Example
wget https://example.com/file.zip

What it does: Downloads the zip file and saves it in the current directory.


2. Power-User Example (Advanced)

For scripting and advanced diagnostics, use this configuration:

# Advanced
wget --mirror --convert-links --adjust-extension --page-requisites --no-parent https://example.com

What it does: Mirrors the entire website locally, converting links for offline reading, saving assets, and blocking parent directory traversal.


⚙️ Warning & Common Pitfalls

[!WARNING] wget only supports downloading files and scraping directories. For sending REST API requests or custom headers, curl is generally a better tool.


Here are some related posts on cli_tty1 you might want to check out: