X
Tech
Why you can trust ZDNET : ZDNET independently tests and researches products to bring you our best recommendations and advice. When you buy through our links, we may earn a commission. Our process

'ZDNET Recommends': What exactly does it mean?

ZDNET's recommendations are based on many hours of testing, research, and comparison shopping. We gather data from the best available sources, including vendor and retailer listings as well as other relevant and independent reviews sites. And we pore over customer reviews to find out what matters to real people who already own and use the products and services we’re assessing.

When you click through from our site to a retailer and buy a product or service, we may earn affiliate commissions. This helps support our work, but does not affect what we cover or how, and it does not affect the price you pay. Neither ZDNET nor the author are compensated for these independent reviews. Indeed, we follow strict guidelines that ensure our editorial content is never influenced by advertisers.

ZDNET's editorial team writes on behalf of you, our reader. Our goal is to deliver the most accurate information and the most knowledgeable advice possible in order to help you make smarter buying decisions on tech gear and a wide array of products and services. Our editors thoroughly review and fact-check every article to ensure that our content meets the highest standards. If we have made an error or published misleading information, we will correct or clarify the article. If you see inaccuracies in our content, please report the mistake via this form.

Close

How to download files on Linux without a web browser (and why you should)

If you're looking for the fastest, most reliable method of downloading online files on Linux, wget is the way to go.
Written by Jack Wallen, Contributing Writer
Penguins representing LInux
Kelly Cheng Travel Photography/Getty Images

When you want to download files from the internet, you typically open your web browser, go to the file in question, and let the downloading commence. But did you know there's a much better way? That way is the wget command.

The wget command uses multiple simultaneous connections that result in much faster downloads. On top of that, wget is capable of resuming downloads that were interrupted by networking issues. Besides, unlike web browsers, wget isn't burdened by cookies, add-ons, and other features that can slow it down or make it less reliable -- especially helpful when you need to download a larger file. Why relegate that to your browser?

Instead, if you're using Linux, opt to go the wget route. Let me show you how.

How to install wget

What you'll need: To make use of wget, you'll need a running instance of Linux and a user with sudo privileges (for the installation).

1. Open a terminal window and install wget

Wget should be installed on your distribution by default. If not, here's how to get it. Log into Linux and open a terminal window. From there, here are the commands for installing wget on Ubuntu, Arch, and Fedora-based distributions.

  • For Ubuntu-based distributions - sudo apt-get install wget -y
  • For Arch-based distributions - sudo pacman -S wget
  • For Fedora-based distributions - sudo dnf install wget -y

Also: Linux might be your best bet for heightening your desktop computer security

2. Using wget

Wget is used from the command line only, so keep your terminal window open. Let's say you want to download an ISO for Ubuntu Desktop Linux and you've found the link (from the official download site) which is https://releases.ubuntu.com/22.04.3/ubuntu-22.04.3-desktop-amd64.iso. Instead of downloading that from your browser, you could simply run the command:

wget https://releases.ubuntu.com/22.04.3/ubuntu-22.04.3-desktop-amd64.iso

One thing to keep in mind is that the file will download in the directory in which you are currently working.

3. Saving a file to a different directory

Let's say you have the directory /ISOS and you want to download the Ubuntu ISO to that directory. For that, you use the -P option (for Path), like so:

wget -P /ISO/ https://releases.ubuntu.com/22.04.3/ubuntu-22.04.3-desktop-amd64.iso

How to download multiple files at once with wget

Here's another cool trick. With wget, you can download multiple files at once. Here's how.

1. Create a file to house the addresses

First, you need to create a new file that will house the URLs for the files to be downloaded. Let's say you want to download ISO files for Ubuntu, Fedora, and Arch Linux. Create the file with the command:

nano downloads

In that file, add the three URLs for the downloads, like so:

https://releases.ubuntu.com/22.04.3/ubuntu-22.04.3-desktop-amd64.iso
https://download.fedoraproject.org/pub/fedora/linux/releases/39/Workstation/x86_64/iso/Fedora-Workstation-Live-x86_64-39-1.5.iso
http://mirrors.acm.wpi.edu/archlinux/iso/2023.12.01/archlinux-2023.12.01-x86_64.iso

Save and close the file.

2. Start the download

To start the download, issue the command:

wget -i downloads

You can then walk away and let the downloads complete.

3. Continue an interrupted download

Let's say a download gets interrupted. Instead of downloading the entire file again, just run the command with the -c option, like so:

wget -c https://releases.ubuntu.com/22.04.3/ubuntu-22.04.3-desktop-amd64.iso

If you're downloading via a file (as we did above) and it gets interrupted, you could continue it like so:

wget -c -i downloads

And that's all there is to use the wget to more reliably (and quickly) download files to your Linux machine. 

Editorial standards