Freebsd: Install wget Utility To Download Files From The Internet

last updated in Categories , ,

How do I install wget the non-interactive network downloader under FreeBSD operating systems? How do I install wget on FreeBSD 8.x?

You can use any one of the following method to install GNU Wget non-interactive program. It is used to download of files from the Internet. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies with password/username support.

Method # 1: Install wget Using pkg_add (Binary method) Command

Type the following command as root user:
# pkg_add -r -v wget
# rehash

Method # 2: Install wget Using FreeBSD Ports Collection

Type the following command as root user to upgrade ports tree, enter:
# portsnap fetch update
Now, install the wget, enter:
# cd /usr/ports/ftp/wget
# make install clean
# rehash

How Do I Use wget command?

You can use the wget command as follows:
$ wget http://example.com/file.pdf
$ wget ftp://ftp.example.com/dir/foo.tbz
$ wget ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.0-release/All/qt4-doc-4.5.2.tbz

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

2 comment

    Have a question? Post it on our forum!