Commands.page Logo

How to Limit Wget Download Speed on Ubuntu

This guide explains how to control bandwidth usage while downloading files with wget on Ubuntu. You will learn the specific command flag required to cap download speeds, ensuring your network remains responsive for other tasks. We will cover the syntax, provide practical examples, and explain how to specify different speed units effectively.

Use the –limit-rate Option

To restrict download bandwidth, use the --limit-rate flag followed by your desired speed. This option tells wget not to exceed the specified amount of bytes per second. This is useful when you need to preserve bandwidth for other applications or avoid saturating your network connection.

Command Syntax

The basic structure of the command is as follows:

wget --limit-rate=AMOUNT URL

Replace AMOUNT with the speed limit and URL with the direct link to the file you wish to download.

Specifying Speed Units

You can define the speed limit using different suffixes to represent kilobytes, megabytes, or gigabytes.

For example, to limit the speed to 500 kilobytes per second, run:

wget --limit-rate=500k http://example.com/file.zip

To limit the speed to 2 megabytes per second, run:

wget --limit-rate=2m http://example.com/large-file.iso

Combining with Other Options

You can combine speed limiting with other common wget flags. For instance, you can continue a partial download while limiting the speed using the -c flag:

wget -c --limit-rate=1m http://example.com/partial-file.zip

This ensures the download resumes where it left off without consuming all available bandwidth.