Linux for Developers Course
Linux for Developers
/
Beginner

wget

Definition

Web Get. A command-line utility specifically designed to download files from the web. It supports downloading entire directories recursively.

Explain Like I'm New

The ultimate download manager. You give it a link to a file, hit enter, and it silently downloads it to your folder.

Real World Example

You are building a server and need to install Docker. You type `wget https://get.docker.com/install.sh`. The script is instantly saved to your computer.

Common Use Cases

  • •Downloading massive files
  • •Scripting software installations

Interview Questions

basic

  • If your internet disconnects halfway through a 10GB download, can `wget` resume the download later?

intermediate

  • What is the primary difference in philosophy between `curl` and `wget`?

Flash Cards

Question

Can it resume?

Click to reveal answer
Answer

Yes. If you add the `-c` (continue) flag, `wget` will look at the partially downloaded file and resume right where it left off.

Question

curl vs wget?

Click to reveal answer
Answer

`curl` is designed to be a pipe—it takes data from the internet and streams it directly to your terminal screen for you to interact with. `wget` is designed to be a downloader—it takes data from the internet and actively saves it as a file on your hard drive.