What is wget in linux
Content on WhatAnswers is provided "as is" for informational purposes. While we strive for accuracy, we make no guarantees. Content is AI-assisted and should not be used as professional advice.
Last updated: April 1, 2026
Key Facts
- wget supports recursive downloading of entire websites and file hierarchies
- It can resume interrupted downloads automatically using the -c flag
- wget allows bandwidth throttling and can follow HTTP redirects
- The tool operates entirely from the command line with no GUI dependency
- It supports authentication, cookies, and custom HTTP headers for advanced downloads
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:
- -O filename: Save the file with a specific name
- -c: Resume interrupted downloads
- -r: Enable recursive downloading
- -l depth: Limit recursion depth when downloading websites
- --limit-rate=speed: Throttle download bandwidth
- -b: Run downloads in the background
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.
More What Is in Daily Life
Also in Daily Life
More "What Is" Questions
Trending on WhatAnswers
Browse by Topic
Browse by Question Type
Sources
Missing an answer?
Suggest a question and we'll generate an answer for it.