Table of Contents
If Linux reports wget: command not found, your shell cannot locate the command. First check whether Wget is available in your current shell. If it’s missing, install it with your distribution’s package manager. If it exists at a known path, check how your shell sets PATH.
1. Check whether the shell can find Wget
command -v wget
wget --version
A path such as /usr/bin/wget and a GNU Wget version confirm that the command works. If the second command prints BusyBox help, a Wget implementation is present, but some GNU Wget options may be unavailable. The screenshots below show the difference between a recognized command run without a URL and a missing command. You can run the checks above without sudo.


2. Install Wget with your package manager
On Debian or Ubuntu, refresh the package lists, then install Wget:
sudo apt update
sudo apt install wget
On Fedora and current RHEL-based systems that use DNF:
sudo dnf install wget
On Arch Linux, use sudo pacman -S wget. On Alpine Linux, use apk add wget from a root shell. In a container, install the package inside the container or add it to the image build. An installation on the host won’t add the command inside the container.
Run wget --version again. If the package manager says Wget is installed but its expected executable is missing, reinstall it with sudo apt install --reinstall wget on Debian or Ubuntu, or sudo dnf reinstall wget on a DNF-based system.

3. Correct PATH if Wget is already installed
Inspect PATH and try the executable by its full path. Replace /usr/bin/wget if your copy lives elsewhere.
printf '%sn' "$PATH"
/usr/bin/wget --version
If the full path works, add its directory to the current shell’s PATH. This example assumes the file is $HOME/.local/bin/wget. Only add directories you trust.
export PATH="$PATH:$HOME/.local/bin"
command -v wget
To keep the change, put the export line in the startup file your shell actually reads. An interactive Bash terminal typically reads ~/.bashrc. A service, cron job, or script may have a different PATH, so test in the same environment where the error occurs. See how Linux launches programs from the command line for more about command lookup.
Download a file once the command works
Run wget URL with the direct link to your file. If you can’t install Wget and curl is already available, curl -fLO URL follows redirects, fails on HTTP errors, and saves using the filename in the URL. For batch downloads and custom destinations, see the Wget download guide.
Reader Comments 0
Sign in with email or Google to join the discussion.