By Tim Miller
Last updated on
Facebooktwitterredditpinterestlinkedintumblr

You’re trying to use the command-line tool wget to download a web page, image, video, etc., but you’re getting an error saying that wget is not recognized as an internal or external command, operable program, or batch file.

This can happen for several reasons:

  • You don’t have wget installed.
  • The PATH environment variable is not set up properly and wget is not in it.
  • There’s a typo in the command or file name that you’re trying to download.

Here are some solutions to the wget is not recognized error:

1. Installing wget (if you don’t have it)

Wget is available for most operating systems, but if it isn’t installed by default on yours, you’ll need to install it yourself.

Here’s how to install wget on Windows 10:

  • Download the latest Windows version of wget here. Download the setup executable file.
  • Once downloaded, open File Explorer and double-click on the setup executable file.
  • Once the installation is finished, press Windows + R shortcut key and type cmd.
  • Verify that wget is working by running:
wget -h

Wget on Mac

Here’s how to install wget on a Mac:

Download and install wget using Homebrew. If you don’t have Homebrew installed, follow our doc here.

brew install wget

Verify wget is installed and working by downloading wget using wget. Nice!

wget https://ftp.gnu.org/gnu/wget/wget-1.21.2.tar.gz

We don’t recommend installing wget using the source code. There are dependencies you have to install. If you don’t install the version of wget with the correct dependencies, the installation may fail.

2. Configuring your PATH variable (If you don’t have it)

To do anything useful on a computer, programs need to be “accessible” and this is done through something called the PATH environment variable. To set up your path variable, you need to configure it.

If you’re using Windows 10, please follow the steps below:

pip is not recognized... FIXED! How...
pip is not recognized... FIXED! How To Properly Install Python Libraries
  • Open the Control Panel (Press Windows + R, type control, and then press Enter).
  • Click System and Security.
  • Click System.
  • On the left side, click Advanced system settings.
  • Click Environment variables.
  • Scroll to find a PATH variable in System variables section and press Edit.
  • When. a new window appears, click New.
  • Enter the following path:
C:\Program Files (x86)\GnuWin32\bin
  • Click OK to save all the changes.
  • Open the Command Prompt and type the following:
wget – help
  • If you see the usage for wget message, wget is now working.

3. Reinstall Wget

If the above solutions don’t work for you, it may be time to reinstall the wget program. Follow the steps below depending on the operating system you have installed.

Ubuntu/Debian for Linux

  1. Type the following command to install wget on Linux:
sudo apt-get install wget

macOS

  1. Install Homebrew. If you don’t have it installed, follow our guide to installing Homebrew on a Mac.
  2. Type the following command to install wget using homebrew:
brew install wget

Windows

  • Download the 32-bit version of wget 1.11.4-1 from here.
  • Open Windows Explorer and double-click on the file you just downloaded.
  • Follow the prompts and use the default settings.

Conclusion

We hope one of the above solutions helps you fix the wget is not recognized error. If you have any questions, please leave a comment below.

2 thoughts on “[Solved] wget is not recognized as an internal or external command”

    • Your version of wget installed on your system may have gotten corrupted. I recommend following the last step to reinstall wget.

      Reply

Leave a Comment