How to Check Wget Version in Linux and Mac?
Knowing the exact version of wget installed on your
system is essential for troubleshooting script errors, ensuring
compatibility with specific download flags, and verifying that you have
the latest security patches. This article provides a quick,
straightforward guide on how to check your wget version
using the command-line interface on Linux, macOS, and Windows
subsystems, while also showing you how to interpret the command’s
output.
Using the Version Flag
The quickest and most universal way to find your wget
version is by using the terminal. Open your command line interface and
type either of the following commands, then press
Enter:
wget --versionAlternatively, you can use the shorthand flag:
wget -VUnderstanding the Output
When you run the version command, the terminal will display a block of text. The most critical information is located right at the top. Here is what you should look for:
- Version Number: The very first line will explicitly
state the version, such as
GNU Wget 1.21.4 built on linux-gnu. - Compilation Features: Below the version line, you
will see a list of features (e.g.,
+digest,+https,+ipv6). A plus sign (+) means the feature is enabled, while a minus sign (-) means it is disabled. This is incredibly useful if you need to confirm whether your installation supports secure HTTPS connections. - Dependencies: The output also lists the specific
libraries
wgetis using, such as the GnuTLS or OpenSSL versions handling your secure downloads.
Troubleshooting the Command
If you run the command and receive an error that looks like
bash: wget: command not found, it means one of two
things:
- Wget is not installed: Many modern operating
systems (like recent versions of Ubuntu or macOS) do not come with
wgetpre-installed. You will need to install it using your package manager (e.g.,sudo apt install wgetfor Debian/Ubuntu orbrew install wgetfor macOS). - Path issues: The application is installed, but your system’s terminal does not know where to find it. Restarting your terminal session or checking your environment variables usually resolves this.