Ce este wget – utilizare și exemple practice

Pe această pagină
  1. Core Functionality: How it Operates
  2. Practical Examples & Use Cases
  3. Wget vs. Curl: Which should you use?
  4. Using Wget on Windows in 2026
  5. Summary: The Administrator’s Best Friend

Wget (short for “Web Get”) is a powerful, non-interactive command-line utility used to retrieve content from web servers. It is a staple tool for developers and system administrators working on mybox or any Linux/Unix environment. Its primary strength lies in its robustness: it can handle slow or unstable network connections, resuming downloads automatically until the task is complete.

In April 2026, wget remains the go-to tool for automated backups, mirroring websites, and batch-downloading resources without needing a graphical interface.


Core Functionality: How it Operates

Unlike a web browser, wget is designed to be “non-interactive.” This means you can start a download, log out of your mybox terminal, and the process will continue in the background. It supports HTTP, HTTPS, and FTP protocols, and it can even navigate through HTML pages to download linked assets.

Basic Syntax

The simplest way to use it is by providing the URL:

Bash

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

Practical Examples & Use Cases

1. Resuming Interrupted Downloads

If you are downloading a large ISO or backup file and the connection drops, you don’t have to start over.

  • Command: wget -c https://example.com/large-file.zip
  • Benefit: Saves time and bandwidth by picking up exactly where it left off.

2. Mirroring an Entire Website

If you need to create an offline copy of a site (for example, to archive a project before migrating it on mybox):

  • Command: wget --mirror --convert-links --adjust-extension --page-requisites --no-parent https://example.com
  • What it does: It follows links, downloads images/scripts, and changes the links to work locally on your computer.

3. Batch Downloading from a List

Instead of typing commands for 50 different files, put the URLs in a text file called links.txt.

  • Command: wget -i links.txt

4. Limiting Download Speed

If you are working on a production mybox server and don’t want to saturate the bandwidth:

  • Command: wget --limit-rate=500k https://example.com/archive.tar.gz

Wget vs. Curl: Which should you use?

While they look similar, they serve different masters.

Feature Wget Curl
Primary Goal Downloading and Archiving. Data transfer and API interaction.
Recursive Yes (can download entire sites). No.
Ease of Use Simple (downloads to file by default). Requires flags (outputs to terminal by default).
API Support Basic. Advanced (supports PUT, POST, DELETE, etc.).
Resuming Native and easy. Requires specific offset flags.

Using Wget on Windows in 2026

While wget is native to Linux, Windows 10 and 11 users can access it easily via:

  • PowerShell: Note that wget in PowerShell is often an “alias” for Invoke-WebRequest. To use the real GNU Wget, you should install it via Winget: winget install GNU.Wget.
  • WSL (Windows Subsystem for Linux): The best way to get the full Linux experience on Windows.

Summary: The Administrator’s Best Friend

On your mybox server, wget is indispensable for:

  • Downloading CMS installation packages (like WordPress or PrestaShop).
  • Automating the retrieval of daily logs.
  • Testing server-to-server connectivity.

Nu ai găsit răspunsul?

Echipa noastră de asistență este aici pentru tine 24/7 – scrie-ne și te ajutăm să rezolvi problema.