How to Fix “wget” Command not Found Error on Linux

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, youll 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 its 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 systems PATH.

5.  Add wget to PATH

If wget exist on your system but isnt 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 doesnt work, try to reinstalling it.

·     For Ubuntu/Debain:

sudo apt-get install  --reinstall wget

 

·     For REHL/CentOS:

sudo dnf reinstall wget

Tags

  • Apple
  • Macbook
  • SSD
  • Linux

Categories

  • Hints 210