Close Menu
    What's Hot

    YouTube Unblocked Proxy: Overview, Benefits, and Real-World Use Cases

    April 7, 2026

    Linux Kernel Release Frequency Statistics 2026

    April 7, 2026

    How To Use The SSH Login Command

    April 7, 2026
    Facebook X (Twitter) Instagram
    Command Linux
    • About
    • Man Pages
    • Arch Linux
    • Statistics
    • How to
      • Q&A
    • OS
      • Windows
    • Blog
      • Featured
    • MORE
      • Easter Eggs
      • IP Address
    • Write For Us
    • Contact Us
    Command Linux
    Home - How to - How to Fix the “wget: command not found” Error

    How to Fix the “wget: command not found” Error

    WillieBy WillieFebruary 13, 2026Updated:March 30, 2026No Comments4 Mins Read

    If your terminal shows wget: command not found, the fix is quick. This error appears because wget is either missing from your machine or your shell can’t locate it. wget is a command-line tool that downloads files over HTTP, HTTPS, and FTP. Most Linux distributions include it by default, but macOS and Windows do not. This guide covers every step to get wget working on any operating system in 2026.

    Why Does the “wget: command not found” Error Show Up?

    Two situations trigger the wget: command not found message:

    CauseExplanation
    wget is not installedYour OS did not ship with wget, or it was never added manually.
    wget is not in your PATHThe binary exists on your machine, but the shell doesn’t know where it lives.

    Before installing anything, check whether wget already exists. Type this into your terminal:

    wget --version

    A version number means wget is ready to use. If you still see wget: command not found, continue with the installation steps below.

    How to Install wget on Your Operating System

    Each OS uses a different package manager. Pick the section that matches yours.

    Debian or Ubuntu

    Refresh your package list first, then install wget:

    sudo apt update
    sudo apt install wget

    After the process finishes, run wget --version to confirm the setup worked. You can also read more about fixing similar command-not-found errors on Linux.

    RHEL, CentOS, and Fedora

    On these distributions, dnf handles package management:

    sudo dnf install wget -y

    Older CentOS 6 builds use yum instead:

    sudo yum install wget

    macOS

    Apple does not include wget. Homebrew makes the setup painless. First, install Homebrew if you haven’t already:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

    Then pull in wget:

    brew install wget

    For a full walkthrough, see the wget on Mac guide.

    Windows

    Windows doesn’t bundle wget either. Download the binary from an official source, grab the correct build (32-bit or 64-bit), and drop wget.exe into a PATH-accessible folder like C:\Windows. Open Command Prompt and test with wget --version.

    How to Add wget to Your System PATH

    Sometimes wget is installed but your shell can’t find it. That means the directory holding wget isn’t listed in your PATH variable. Check your current PATH:

    echo $PATH

    Look for common directories like /usr/bin or /usr/local/bin. If the folder containing wget is missing, append it:

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

    Make this permanent by adding that line to ~/.bashrc or ~/.zshrc, then reload with source ~/.bashrc. For a detailed walkthrough, check the guide to adding directories to PATH in Linux.

    On Windows, open System Properties, go to the Advanced tab, click Environment Variables, and edit the PATH entry to include the folder where wget.exe sits.

    Common wget Commands After Installation

    Once the wget: command not found error is gone, try these everyday commands:

    TaskCommand
    Download a single filewget https://example.com/file.txt
    Rename the downloaded filewget -O newname.txt https://example.com/file.txt
    Download multiple fileswget URL1 URL2 URL3
    Mirror a directorywget -r https://example.com/docs/
    Limit bandwidth to 1 MB/swget --limit-rate=1m https://example.com/file.txt
    Resume a partial downloadwget -c https://example.com/bigfile.zip

    For the complete list of flags and options, check the wget man page.

    FAQs

    Why do I get “wget: command not found” on macOS?

    Apple does not ship wget with macOS. You need to install it through Homebrew by running brew install wget in your terminal after setting up Homebrew.

    Can I use curl instead of wget?

    Yes. curl comes pre-installed on most systems and handles file downloads. Use curl -O URL to download a file. wget is better for recursive downloads and mirroring sites.

    How do I check if wget is already installed?

    Run wget --version in your terminal. If it prints a version number, wget is installed. If you see “command not found,” it needs to be installed.

    Does wget work on Windows?

    Yes, but you have to install it manually. Download the wget.exe binary, place it in a PATH-accessible folder like C:\Windows, and it will work from Command Prompt.

    What if wget is installed but still not found?

    Your PATH variable is likely missing the directory where wget lives. Run which wget to find it, then add that directory to your PATH in ~/.bashrc or ~/.zshrc.

    Willie
    • Website

    Willie has over 15 years of experience in Linux system administration and DevOps. After managing infrastructure for startups and enterprises alike, he founded Command Linux to share the practical knowledge he wished he had when starting out. He oversees content strategy and contributes guides on server management, automation, and security.

    Related Posts

    Bash Cut: How to Pull Out Portions of Text from Lines

    March 31, 2026

    How to Use WinSCP for Linux File Transfers

    March 30, 2026

    How to Resolve Exit Code 1 Errors in Kubernetes Containers

    March 28, 2026

    How to Check Memory Size in Linux Using Terminal and GUI

    March 28, 2026
    Top Posts

    IDE And Text Editor Usage Statistics Among Linux Developers 2026

    February 9, 2026

    Let It Snow Google Trick

    December 31, 2025

    LESSOPEN

    February 23, 2026

    CHARDET

    March 17, 2026
    • Home
    • Contact Us
    • Privacy Policy
    • Terms of Use

    Type above and press Enter to search. Press Esc to cancel.