How
to Fix “wget” Command not Found Error on Linux
·
Example:
Linux
·
Steps:
1.
Why
This Error Happens
·
wget
is not installed.
·
wget
is not your system’s path.
·
wget
installation in broken or corrupted.
2.
Check
If wget Is Installed.
·
Run
this in the terminal
sudo wget
·
If
wget is working, you’ll see a “missing URL” message
·
If
you see “command not found”, continue to the next step.
3.
Install
wget
·
For
Ubuntu/Debain-based systems:
Sudo apt-get install wget
·
For
REHL, Fedora, or CentOS:
Sudo dnf install wget
·
After
installing, check if it’s working
wget --version
4.
Check
wget Location
which wget
·
If
it returns a path like wget, wget is installed correctly.
·
If
it returns nothing, wget might not be installed or not in your system’s
PATH.
5.
Add
wget to PATH
If wget exist
on your system but isn’t recognized, you can add its location
manually.
·
Temporary
solution command:
Export PATH=$PATH:/usr/bin
·
Permanent
Solution command:
echo ‘export PATH=$PATH:/usr/bin’ >>
~/.rc
6.
Reinstall
wget If It’s Broken
If wget is
installed but still doesn’t work, try to reinstalling it.
·
For
Ubuntu/Debain:
sudo apt-get install --reinstall wget
·
For
REHL/CentOS:
sudo dnf reinstall wget