How to Install Wget on Debian 13

In this blog post, we will show you go to install Wget on Debian 13. Wget or World Wide Web Get is a free command-line utility for non-interactive file downloading from the Internet. Wget supports HTTP, HTTPS, and FTP protocols, schedules downloads, supports recursive downloads, mirrors websites, can resume on interrupted connections, and works offline. The Wget tool is used daily by system administrators and developers on multiple operating systems such as Linux, Windows, and macOS. In this tutorial, we will install Wget from the default Debian 13 repository and build it from source.

Installing Wget is a straightforward process that may take different depending on which way we are using for installation. Let’s get started!

Prerequisites

Update the System

Before we start with the Wget installation, it is recommended first to update the system packages to their latest available versions:

sudo apt update -y && sudo apt upgrade -y

Install Wget from Debian repository

Installing Wget from the default Debian 13 repository is the easiest and fastest way. To install it, execute the following command:

sudo apt install wget -y

Once installed, check the Wget version with the command below:

wget -V

You should get output similar to this:

GNU Wget 1.25.0 built on linux-gnu.

-cares +digest -gpgme +https +ipv6 +iri +large-file -metalink +nls 
+ntlm +opie +psl +ssl/gnutls 

Wgetrc: 
    /etc/wgetrc (system)
Locale: 
    /usr/share/locale 
Compile: 
    gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc" 
    -DLOCALEDIR="/usr/share/locale" -I. -I../../src -I../lib 
    -I../../lib -Wdate-time -D_FORTIFY_SOURCE=2 
    -I/usr/include/p11-kit-1 -DHAVE_LIBGNUTLS -DNDEBUG -g -O2 
    -Werror=implicit-function-declaration 
    -ffile-prefix-map=/build/reproducible-path/wget-1.25.0=. 
    -fstack-protector-strong -fstack-clash-protection -Wformat 
    -Werror=format-security -fcf-protection -DNO_SSLv2 
Link: 
    gcc -I/usr/include/p11-kit-1 -DHAVE_LIBGNUTLS -DNDEBUG -g -O2 
    -Werror=implicit-function-declaration 
    -ffile-prefix-map=/build/reproducible-path/wget-1.25.0=. 
    -fstack-protector-strong -fstack-clash-protection -Wformat 
    -Werror=format-security -fcf-protection -DNO_SSLv2 -Wl,-z,relro 
    -Wl,-z,now -lpcre2-8 -luuid -lidn2 -lnettle -lgnutls -lz -lpsl 
    ../lib/libgnu.a 

Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Originally written by Hrvoje Niksic .
Please send bug reports and questions to .

That is how we install Wget from the default repository. Now, in the next paragraph, we will see how to build it from source.

Install and Build Wget from source

Building software from source code in Linux, rather than installing pre-compiled packages via a package manager, is typically done to access newer versions, greater customization, or to ensure compatibility with specific system configurations.

Before we can start with the building and compiling process, we need to install some dependencies:

sudo apt install build-essential libssl-dev gettext curl tar -y

Once done, first we need to download the Wget source code:

curl -O https://ftp.gnu.org/gnu/wget/wget2-2.2.0.tar.gz

Once downloaded, extract the file and enter it into the Wget directory:

tar xvf wget2-2.2.0.tar.gz

cd wget2-2.2.0/

Configure the source code:

./configure

Compile the source code:

make

Install the compiled Wget executable:

sudo make install

Once the process is completed, we need to make a symbolic link:

ln -s /usr/local/bin/wget2 /usr/bin/wget

To check the installed Wget version:

wget -V

You should get the following output:

root@host:~/wget2-2.2.0# wget -V
GNU Wget2 2.2.0 - multithreaded metalink/file/website downloader

+digest +https +ssl/openssl +ipv6 +iri +large-file +nls -ntlm -opie -psl -hsts
+iconv -idn -zlib -lzma -brotlidec -zstd -bzip2 -lzip -http2 -gpgme

Copyright (C) 2012-2015 Tim Ruehsen
Copyright (C) 2015-2024 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later
.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Please send bug reports and questions to .

Most used Wget Commands with Examples

Here’s a clean list of commonly used Wget commands in Linux with examples and what they do:

Download a single file:

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

Download and save with a custom filename:

wget -O custom-name.zip https://example.com/file.zip

Resume a partially downloaded file:

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

Run the download in the background:

wget -b https://example.com/largefile.tar.gz

Download multiple files from a list:

wget -i urls.txt

Save downloads to a specific directory:

wget -P ~/Downloads https://example.com/file.zip

Limit download speed:

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

Quiet mode (no output):

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

Retry a set number of times:

wget --tries=10 https://example.com/file.zip

Recursive download (whole directory or site):

wget -r https://example.com/path/

Wait between requests (spacing downloads):

wget -w 5 https://example.com/file1.zip

Enable recursive download and create local offline website:

wget --mirror --convert-links --page-requisites --no-parent https://example.com/

Congratulations! You successfully installed Wget on Debian 13 OS in different ways and learned the most commonly used Wget commands with real examples.

If you liked this post on installing Wget on Debian 13, please share it with your friends or leave a comment below.

Leave a Comment