If you’re a Linux user then you will definitely know about the wget command this is one of the handiest and most useful commands of Linux which is used to download and get files from the Internet to your system. But what if one day you get an error stating “wget command not found” how will you fix this error?
The “wget command not found” error is one of the most common error issues faced by Linux users while trying to execute the wget command to download a media or file from the internet. If you’re also the one who is facing this error and don’t know anything about it then you’re at the right stop here we will be going to tell you how to fix “wget command not found” error on your Linux system.
But before moving to the main topic let’s first discuss wget command and the causes behind this error issue.
Table of Contents
What is wget command?
The wget command is one of the most useable and important commands in Linux systems it is used to download files from the internet to the systems. It is a free Linux tool that supports HTTP, HTTPS, and FTP protocols, and HTTP proxies for downloading any file.
Not only for Linux users wget command is an important command for any OS users if they want to download, get or work with files from remote servers on the internet. wget is also known as a non-interactive downloader because it works in the background.
This means users can start the download and get disconnected from the system but still, the downloading file will resume in the background without the user interface. This command is a very useful one when you’re trying to download a file with a slow and unstable internet connection. If your connection gets lost and the download will stop this command will wait until you recover a connection and resume your download.
What Causes “wget command not found” Error?
Sometimes when you try to run the wget command to download a file from the internet you get an error saying “bash wget command not found” or “wget command not found”. There is a certain reason why you’re facing this error on your Linux system.
This error mainly occurs on your system when you don’t have “wget” utility installed on your system or when your system isn’t able to run the wget function or command properly. So the main cause behind this error is that you don’t have the wget command installed on your system.
If you want to make sure about the installation of this utility on your system then follow the command stated below.
How to check if wget is installed on the system?
To check out if wget is installed on your Ubuntu Linux run the following command into a terminal window:
$ which wget
If you’ve already installed wget on your system then run the below-given command to check the version of the installed wget:
$ wget -V
After running the code you will get the output showing the version of the wget running on your system. The below image is an example of the output that you will get after running the code:
How to Install wget on Linux?
If after running the above code you get that there is no wget utility installed on your Linux system then you need to install it to get rid of the “wget command not found” error. To install wget on Ubuntu Linux or Debian run the following command:
$ sudo apt-get install wget
After the completion of the installation check if the utility is downloaded or not by running the command in the above section.
How to Install wget from Internet?
If you’ve run the above command and cannot able to download the wget on your system then you can try downloading it from the Internet. To download wget from the Internet run the following command:
$ curl -O https://ftp.gnu.org/gnu/wget/wget-latest.tar.gz
After installing the above-mentioned file extract it into gzip file using the following command:
$ tar zxvf wget-latest.tar.gz
After extracting the file in gzip a new folder will be created go to the folder and run the following commands to install wget:
$ cd wget-XXX
$ ./configure
$ make
$ sudo make install
Now after successfully installing the wget use the above-mentioned command to make sure that wget gets installed in your system.
Conclusion
Linux OS is one of the most popular OS used by people around the world with a huge number of users the errors on this OS are also huge. wget command is one of the most useful commands in Ubuntu Linux to download files from the internet.
So it is important to fix errors related to it like “wget command not found” in case you’re also facing such an error then follow the above-given fix to solve your problem. In case you’ve followed the fix and are still stuck with your problem then feel free to contact us, we will try to solve your problem as soon as possible.