If you are facing the same problem, then we are here with a solution and the cause of its occurrence.
Let’s dive in and understand the topic in detail. Before start let’s understand why it is so popular tool?
What makes it so high in demand?
Well, wget comes with a lot of impressive and beneficial features associated with it. It is an incredible and powerful command-line tool that supports you to download several files from the internet. Additionally, it will retrieve the file in various protocols for instance HTTP, FTP, and HTTPS.
How to fix Wget command not found error? [A Complete Guode]
In most of the Linux distributions, for instance, Mint, Debian, Ubuntu, CentOS, etc, the wget command is not pre-installed. Hence, when you try to execute wget command, maybe you can get an error message as stated below:
bash: /usr/bin/wget: No such file or directory
As you have read that this error is called from the bash therefore you see bash: in the error message. This message implies that the wget binary cannot be found in a specific binary path /usr/bin. That further means that you do not have wget installed in your system.
To be double sure, use the following command to search the file as well as the folder:
You will see such output on your display as shown in the given screenshot
As it is evident that the system does not have the wget command installed in it, let us install it.
How to install wget command
The most common solution for resolving the error, bash: /usr/bin/wget: No such file or directory, that you see on your screen is to install wget command.
The best method to install this tool is via a repository with the package management tool. It is an incredibly reliable as well as an easy method.
Let’s begin with the procedure.
How to install wget on Ubuntu, Mint, Debian?
To install wget command, you have the option to use two commands as stated below:
sudo apt install wget
sudo apt-get install wget
These packages use the package managers like apt or apt-get to perform installation, removal, updating of the packages. As you can see above, we have used the same package managers.
Now, moving on! Let us understand the process to install wget on Fedora, CentOS, Fedora, RHEL.
How to install wget on Fedora, CentOS, RHEL?
The distributions like CentOS, Fedora, RHEL, use package managers like yum or dnf for the purpose of installation, removal, or updating of packages. Therefore, we will use these package managers to install the wget command. Take a look.
sudo dnf install wget
sudo yum install wget
Now that you have successfully installed wget on your respective devices, it’s time to check the command version.
How to display the wget command version?
There are various ways through which you can check the version of wget command. Here we are going to use the -v option to discover the same.
The command you have to execute is:
Your output screen will look like this as shown in the below snapshot.
As you can see the GNU wget 1.20.3 version is installed on the system.
Here are a few examples of the most commonly used wget commands. Take a look:
wget command with -b option
You can use this option when you wish to resume the download in the background and continue your task as is. Here is the syntax:
wget command with -c option
wget command has the ability to resume the file from where it stopped rather than starting it from scratch. Use the following command to meet your requirements:
wget command with -o option
You can use this option to save the file that you download with a specific file name. Take a look at the below-stated command:
Undoubtedly, wget is a powerful and incredible command. As in this article, we have explained various wget commands with examples through you can able to fix your problem statement. This article is helping you to fix the wget command is not found error. We hope that the information helps you to clarify all your ambiguities related to the wget command. Also, if you think that there is any other way through you are able to fix this error and wanna share it with other users then you can comment on your solution via the given comment box.
People Are Aslo Reading: