How to Fix Wget Command not Found in Linux?

Encountering the “wget command not found” error can be a frustrating roadblock when you’re trying to download files from the web using the popular wget command in a Linux environment. This error typically signifies that the wget utility is not installed on your system or that its executable is not in the system’s PATH. In this detailed guide, you’ll explore the root causes of this issue and learn step-by-step solutions to get wget up and running on your Linux system.

Understanding the Problem

  • Missing Installation: The most common reason for the “wget command not found” error is that wget is not installed on your system.
  • PATH Configuration: Even if wget is installed, the executable might not be in a directory listed in your system’s PATH. The PATH is a list of directories that the system searches for executable files.

Checking if wget is Installed

Before diving into solutions, let’s verify if wget is installed on your system. Open a terminal (CTRL + ALT+ T) and type the following command:

wget --version

If wget is installed, you should see information about the version as shown below:

Normal Output of Wget Command

If not, the system will respond with “command not found,” or it will return the error “no directory found”:

Solution 1: Installing wget

Command not-found errors can usually be solved by installing the tool or application by using the package manager, depending on the distribution of Linux that is being used.

Ubuntu/Debian-based Systems

On Ubuntu or Debian-based systems, you can use the following command to install wget:

sudo apt-get update
sudo apt-get install wget

After executing this command, wait for the installation process to complete:

However, if you are using a different variant of Linux, then you can follow the commands that are listed below.

Red Hat/Fedora-based Systems

For Red Hat or Fedora-based systems, use:

sudo yum install wget

Dracula Servers FreeRadius VPS

If you’re looking for a reliable and high-performance VPS solution for FreeRadius, consider Dracula Servers’ FreeRadius VPS service. Dracula Servers offers a robust and dedicated hosting environment tailored for FreeRadius applications, ensuring optimal performance and reliability.

With Our VPS, you can experience seamless integration with FreeRadius, allowing you to manage authentication, authorization, and accounting for your network services efficiently. Dracula Servers provides a user-friendly platform coupled with top-notch support, making it an excellent choice for those seeking a hassle-free FreeRadius hosting experience.

For more information and to get started, visit Dracula Servers FreeRadius VPS.

Solution 2: Verifying wget Location in PATH

Assuming wget is installed, the next step is to ensure its executable is in a directory listed in your system’s PATH. You can find the location of wget by using the which command:

which wget

Normally, executing this command will result in the “Path” in which the wget can be found, which looks something like this:

If this command returns nothing, it means wget is not in your PATH.

To add wget to your PATH, you can use the following command (replace /path/to/wget with the actual path returned by the which command):

export PATH=$PATH:/path/to/wget

To make this change permanent, add the above line to your shell configuration file (e.g., ~/.bashrc for Bash).


Resolving the “wget command not found” issue involves a systematic approach. First, ensure that wget is installed, and if not, install it using the appropriate package manager. Next, verify and update your system’s PATH to include the directory where wget is located. By following these steps, you can overcome this common obstacle and continue utilizing the powerful capabilities of wget for file retrieval on your Linux system. Remember, troubleshooting Linux commands often involves a balance of package management and system configuration knowledge, and mastering these skills enhances your overall proficiency in Linux environments.

Check out More Linux Tutorials Here!

Notify of
Inline Feedbacks
View all comments
× Dracula Servers

Subscribe to DraculaHosting and get exclusive content and discounts on VPS services.