Privacy Policy
© 2025 linux101.dev

wget Command

wget is a non-interactive command-line utility for downloading files from the web. Its strength lies in its robustness and ability to work in the background, making it ideal for large downloads or scripting.

Basic Downloading

Download a File

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

Downloads the specified file into the current directory.

Download and Rename

wget -O my-archive.zip https://example.com/file.zip

The -O (uppercase) flag saves the downloaded file with a new, specified name.

Advanced Downloading

Download in the Background

wget -b https://example.com/large-video.mp4

The -b flag starts the download and immediately sends it to the background, freeing up your terminal. Status is saved to a wget-log file.

Resume a Download

wget -c https://example.com/large-video.mp4

The -c flag attempts to continue a partially downloaded file. If the download was interrupted, this command will resume it from where it left off.

Recursively Download a Website

wget -r -p -k https://example.com

Downloads an entire website for offline viewing.

Flag breakdown:
  • -r → Recursive download.
  • -p → Download all files necessary to display the page (images, CSS, etc.).
  • -k → Convert links in the downloaded files to point to local resources.