Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Fix "wget: command not found"

wget is not installed, or it is not in your PATH. Install it with your package manager.

VPS and Cloud Servers1 min read2 steps4 screenshots

Why it happens

  1. wget is not installed on the system. Many minimal and container images leave it out.
  2. It is installed, but its folder is not in the PATH.

Fix 1: Install wget

First check whether it is there:

wget --version
wget not found

Debian and Ubuntu

sudo apt install wget
Installing wget

Check again:

wget --version
The wget version after install

CentOS, Rocky, AlmaLinux and Fedora

sudo dnf install wget

On older systems use sudo yum install wget.

Arch Linux

sudo pacman -S wget

macOS (Homebrew)

brew install wget

Fix 2: Add wget to the PATH

If it is installed, find where:

which wget
Finding the wget path

If which prints nothing, search for the file with find / -name wget 2>/dev/null. Then add its folder to the PATH:

export PATH=$PATH:/path/to/wget

Put the same line in ~/.bashrc to keep it.

Use curl in place of wget

If you cannot install wget, curl often works. To download a file:

curl -O https://example.com/file.zip

Quick recap

  • Install wget with apt, dnf or pacman.
  • If it is installed, fix the PATH.
  • curl -O is a good backup.