How to fix the error “wget command not found”

One of the countless features that the Linux operating system provides its users is the ability to download files and programs directly from the terminal. There are different tools such as apt, curl and wget. The wget is a command line tool to download packages/files from various web pages. It is an extremely safe tool since it has the ability to resume its installations even after a crash. Attempting to utilize this tool can lead to the issue “wget command not found”.

This article provides a detailed guide on why this problem is invoked and the measures that can be taken to fix this issue.

How to resolve the problem “wget command not found”?

There is only one major cause that can lead to this problem. This section will give a detailed explanation of the issue and its solutions.

Reason: The wget tool is not installed

The “wget command not found” issue occurs when the tool is not installed on the system and you are trying to use it. For the wget tool, it needs to be checked if the tool is installed on your system. Run the following command to check:

$ sudo wget -V

If your system does not have it installed, the following output will be shown:

Solution: Install wget Tool

The most useful procedure to resolve this problem is to install the wget tool onto your system. There are various methods that can be utilized for the installation of the wget tool.

On Ubuntu/Debian

For Ubuntu/Debian operating systems, the installation is done using apt. The apt repository is utilized to install the wget package onto the system using the following command:

$ sudo apt install wget

The image below shows the successful installation of the wget package using the apt repository:

On CentOS/Fedora

For these operating systems the yum command is utilized. The command needed is mentioned below:

$ sudo yum install wget

Through these methods the wget tool will be installed onto the system and the “wget command not found” will be resolved.

Conclusion

The “wget command not found” problem occurs when the system does not have the wget package installed on it. It can be fixed by installing the wget package on the system using the apt repository on the Ubuntu systems. For the CentOS systems, the yum command will be utilized to install the wget tool. This article has provided a detailed guide on the reasoning behind the error “wget command not found” and the possible solutions to solve the error.