Skip to main content

Command referencewget

wget command (Linux / bash / sh / zsh)

Linuxbashshzshnetworkbeginner

What it does

Download web resources noninteractively, including recursive retrieval. When people search for the wget command linux download, they usually want wget's everyday flags, safe examples, and how it differs from related tools. Below you'll find syntax, options, and copyable examples for Bash/sh/zsh.

Download web resources noninteractively, including recursive retrieval.

Syntax

wget [OPTION]... [URL]...

Common options

Flag / optionMeaning
-O FILEWrite to a chosen filename.
-cContinue a partially downloaded file.
-qSuppress normal output.
-rDownload recursively.
--limit-rate=RATECap transfer speed.

Practical examples

Download

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

Saves using the remote filename.

Resume

wget -c https://example.com/file.iso

Continues a partial local download.

Choose name

wget -O guide.pdf https://example.com/latest-guide

Stores the response as guide.pdf.

Linux ↔ Windows equivalent

Closest match: Invoke-WebRequest (Windows / PowerShell). Send HTTP and HTTPS requests and return response metadata and content.

Common mistakes

  • Using recursive mode without domain and depth limits.
  • Assuming a server supports resuming partial downloads.

FAQ

What does wget do in Linux?

Download web resources noninteractively, including recursive retrieval.

How do I use wget from the terminal?

Start with `wget [OPTION]... [URL]...`, then choose only the options needed for the task.

What is a practical wget example?

Try `wget https://example.com/file.iso` — Saves using the remote filename.

Can I use wget in a shell script?

Yes. wget works in Bash, sh, and Zsh, but scripts should handle quoting, errors, and command output explicitly.

Browse the full Linux and Windows command reference to search more bash, CMD, PowerShell, Conda, and GitHub CLI commands.