You can use any one of the following method to install GNU Wget non-interactive program on a FreeBSD operating system. The wget used to download files from the Internet. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies with username and password support.
How to install wget on FreeBSD
- Open a terminal window.
- Log in to remote FreeBSD server using ssh:
ssh user@freebsd-ec2-host-ip - To add the package on FreeBSD, run:
pkg install wget - To add the FreeBSD ports, run:
cd /usr/ports/ftp/wget/ && make install clean
Let us see all commands and configs example in details.
Related: How to install curl on FreeBSD using pkg command
Installing GNU wget using pkg_add (Binary method) Command
First, update your FreeBSD box by applying security updates using pkg/freebsd-update:
$ sudo pkg update
$ sudo pkg upgrade
Next run the following pkg command on the latest version of FreeBSD Unix computer:
$ sudo pkg update
$ sudo pkg install wget
Type the following command as root user for older version of FreeBSD v8.x or older:
# pkg_add -r -v wget
# rehash
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 ## or hash -r for 'bash/sh/ksh'
Finding wget version
Run the following to print GNU/wget version:
wget --version
Outputs:
GNU Wget 1.20.3 built on freebsd12.1. -cares +digest -gpgme +https +ipv6 +iri +large-file -metalink +nls +ntlm +opie -psl +ssl/openssl Wgetrc: /usr/local/etc/wgetrc (system) Locale: /usr/local/share/locale Compile: cc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/usr/local/etc/wgetrc" -DLOCALEDIR="/usr/local/share/locale" -I. -I../lib -I../lib -I/usr/local/include -I/usr/local/include -I/usr/include -DLIBICONV_PLUG -D_THREAD_SAFE -DNDEBUG -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing Link: cc -DNDEBUG -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -L/usr/local/lib -L/usr/local/lib -L/usr/lib -fstack-protector-strong -lidn2 /usr/lib/libssl.so /usr/lib/libcrypto.so -ldl -lz ftp-opie.o openssl.o http-ntlm.o ../lib/libgnu.a /usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib /usr/local/lib/libunistring.so -Wl,-rpath -Wl,/usr/local/lib Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://www.gnu.org/licenses/gpl.html>. 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 <hniksic@xemacs.org>. Please send bug reports and questions to <bug-wget@gnu.org>.
How do I use wget command on FreeBSD?
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
For more info see “Linux wget: Your Ultimate Command Line Downloader.
How do I resume file downloads on wget?
The syntax is:
wget -c url
wget --continue url
Conclusion
This page demonstrated how to install the wget command on a FreeBSD based operating system using both binary pkg and ports methods. GNU/wget is easy and can be used from your shell scripts, cron jobs, terminals without GUI or X-Windows support, and more. GNU wget has many features to make retrieving large files or mirroring entire web or FTP sites easy. For more info see GNU/wget homepage.
- Freebsd Install wget Utility To Download Files From The Internet
- How to install wget on RHEL 8 using the dnf command
- Debian or Ubuntu Linux install wget
- RHEL/CentOS 7 install wget using yum
- Mac OS X Sierra Install wget Network Downloader Utility
- CentOS 8 install wget
🐧 3 comments so far... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Thank buddy, that was helpful. I was struggling with FreeBSD very first time
How to upgrade wget does know anyone?
On FreeBSD you type the following two as the root to update all packages including GNU wget: