Introduction to Wget

The Wget package contains a utility useful for non-interactive downloading of files from the Web.



Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

Package Information

Wget Dependencies



GnuTLS-3.8.1, HTTP-Daemon-6.16 (for the test suite), IO-Socket-SSL-2.083 (for the test suite), libidn2-2.3.4, libpsl-0.21.2, PCRE-8.45 or pcre2-10.42, and Valgrind-3.21.0 (for the test suite)

Installation of Wget

Install Wget by running the following commands:

./configure --prefix=/usr      \
            --sysconfdir=/etc  \
            --with-ssl=openssl &&

To test the results, issue: make check.

Some tests may fail when Valgrind tests are enabled.

Now, as the root user:

make install

Command Explanations

--sysconfdir=/etc: This relocates the configuration file from /usr/etc to /etc.

--with-ssl=openssl: This allows the program to use openssl instead of GnuTLS-3.8.1.

--enable-valgrind-tests: This allows the tests to be run under valgrind.

Configuring Wget

Config Files

/etc/wgetrc and ~/.wgetrc


Installed Program: wget
Installed Libraries: None
Installed Directories: None

Short Descriptions


retrieves files from the Web using the HTTP, HTTPS and FTP protocols. It is designed to be non-interactive, for background or unattended operations