What is wget in linux

Last updated: April 1, 2026

Quick Answer: wget is a command-line utility for downloading files from the internet using HTTP, HTTPS, and FTP protocols on Linux and Unix systems without requiring a graphical interface.

Key Facts

Overview

wget (Website Get) is a free, open-source command-line download manager developed by the GNU Project. It is one of the most widely used tools for downloading files on Linux, macOS, and other Unix-like systems. Unlike graphical browsers, wget operates entirely from the terminal, making it ideal for automated downloads, scripting, and server environments where graphical interfaces are unavailable.

Key Features

Multi-Protocol Support: wget supports HTTP, HTTPS, and FTP protocols, allowing users to download files from various types of servers. The tool automatically handles protocol detection based on URLs.

Recursive Downloads: One of wget's most powerful features is its ability to download entire websites recursively. Using the -r flag, users can mirror complete website structures, including all linked pages and resources.

Resume Capability: wget can resume interrupted downloads, which is essential for large files. If a download is interrupted, using the -c flag allows wget to continue from where it left off rather than starting over.

Common Use Cases

System administrators use wget for downloading software packages and updates on servers. Web developers use it to test website mirrors and validate links. Data analysts use wget to bulk download datasets from repositories. The tool is also frequently used in bash scripts for automated file retrieval tasks.

Basic Syntax and Options

The basic wget command is: wget [options] [URL]. Common options include:

Installation and Availability

wget comes pre-installed on most Linux distributions. On systems where it's not available, it can be installed using package managers like apt, yum, or brew. The source code is freely available under the GNU GPL license.

Related Questions

How do I download a file using wget?

Use the basic syntax: wget https://example.com/file.zip. The file will be downloaded to your current directory. Add -O to specify a custom filename.

What is the difference between wget and curl?

wget is optimized for downloading files and recursive website mirroring, while curl is a more general-purpose data transfer tool. curl is better for API interactions; wget is better for bulk downloads.

How do I mirror an entire website with wget?

Use: wget -r -l inf https://example.com. The -r enables recursion, -l inf sets unlimited depth, and wget will download the entire site structure to your directory.

Sources

  1. GNU wget - Official Project Page GPL-2.0
  2. wget man page - Linux Documentation GPL-2.0