GNU Wget

About Wget

Wget is an open-source commandline tool for downloading files using HTTP. Wget is licensed under the GPL license. Wget enables you to download any file instantly to your current working directory, all you need to do is provide the URL.

By the time you read this, it is possible that the latest version has been updated from version 1.11.4. You may want to use a newer version, but it's possible a newer version might not work the same way. To ensure a positive outcome, don't upgrade unless you have a good reason to, or if the Wget folks recommend you to do so on their website.

Prerequisites

Wget has no prerequisites, but it will make use of gettext and OpenSSL if they are detected.

Installing Wget automatically

I usually tell people to use Wget to download the source code for packages. If you don't have Wget installed, you obviously can't "download Wget using Wget". Since Wget is a very lightweight package, many package managers include it. You might choose to cheat and use a package manager, but since Wget is not a complex piece of software I recommend simply downloading wget-1.11.4.tar.gz some other way, and installing manually.

Installing Wget via apt-get (Debian, Ubuntu, ...)
# apt-get install wget
Installing Wget via yum (Fedora, CentOS, ...)
# yum -y install wget
Installing Wget via zypper (openSUSE)
# zypper install wget
Installing Wget via pkgtools (Slackware)
# installpkg wget
Installing Wget via pkg_add (FreeBSD)
# pkg_add -r wget
Installing Wget via tce-load (TinyCore Linux)
# tce-load -w -i wget.tcz
Other:
http://distrowatch.com/dwres.php?resource=package-management
Binaries
rpmfind.net

Downloading Wget

As I write this, the latest version of Wget is 1.11.4. You can download this, or another version, at http://ftp.gnu.org/gnu/wget/. Assuming you want to install version 1.11.4, download wget-1.11.4.tar.gz, put this into a temporary folder, such as /tmp/wget, and follow the rest of these instructions to install it.

For example: downloading Wget 1.11.4 using Wget:
$ mkdir /tmp/wget
$ cd /tmp/wget
$ wget http://ftp.gnu.org/gnu/wget/wget-1.11.4.tar.gz

Installing Wget manually

Extract Wget
$ cd /tmp/wget
$ gzip -dc < wget-1.11.4.tar.gz | tar -xf -
$ cd wget-1.11.4
Build Wget
$ ./configure --prefix=/usr
$ make
Install Wget (must be root user)
# make install

Files

This version of Wget, when installed, produces the following files (assuming --prefix=/usr)

Wget Binary Files
/usr/bin/wget
Wget Documentation Files
/usr/share/man/man1/wget.1
/usr/share/info/wget.info
Wget Configuration Files
/usr/etc/wgetrc

Feedback

I personally dislike outdated documentation. If anything here seems wrong, or perhaps did not work for you, please email me (jay@petio.org) and tell me so I can update it. Thanks!