Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

How to Fix “wget: command not found” on Linux

Check whether Wget is installed, install it with your Linux package manager, and fix PATH when the executable is already present.

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.

Fix 'wget: command not found' error in Linux Picture 1

Fix 'wget: command not found' error in Linux Picture 2

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

Fix 'wget: command not found' error in Linux Picture 3

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.

Fix 'wget: command not found' error in Linux Picture 4

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

Fix 'wget: command not found' error in Linux Picture 5

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

Fix 'wget: command not found' error in Linux Picture 6

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.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.