Home Buy Data Subscribe API Support My Account

How to Install wget on Windows, Linux, and macOS

Using wget can be a powerful and efficient alternative for downloading our historical market data, especially when automating bulk downloads or integrating them into scripts. Since we provide direct download links in plain text format, wget seamlessly reads the list of URLs and retrieves files with minimal setup.

Its ability to resume interrupted downloads, preserve original filenames via the --content-disposition option, and operate silently in the background makes it ideal for users with limited bandwidth or long download queues. Unlike browser-based downloads that may time out or require manual intervention, wget runs reliably over extended periods, making it a trusted tool for developers and researchers who prefer command-line control and automation over graphical interfaces.

Installing wget on Windows

Here are the instructions for the simplest installation of wget on Windows and adding it to your system's PATH for easy access from the command line.

1. Download wget

A reliable source for pre-compiled Windows binaries of wget is Eternally Bored. For simplicity, you can download the 64-bit executable directly.

  • Go to the wget download page: https://eternallybored.org/misc/wget/
  • Download the executable: Find the latest version in the table and click the "EXE" link in the "x64" column to download the wget.exe file.

2. Create a Folder for wget

To keep your system organized, it's best to place the wget.exe file in a dedicated folder.

  • Create a new folder: A good practice is to create a folder like C:\wget.
  • Move the downloaded file: Move the wget.exe file you downloaded into this new folder.

3. Add the Folder to the Windows PATH

Adding the folder to the Windows PATH allows you to run wget from any location in the Command Prompt or PowerShell without typing the full path to the executable.

  1. Open Environment Variables:
    • Press the Windows key, type Edit the system environment variables, and press Enter.
  2. Open the Environment Variables Window:
    • In the "System Properties" window that appears, click the Environment Variables... button.
  3. Edit the Path Variable:
    • In the "System variables" section (for all users) or "User variables" (for only your account), find and select the Path variable, then click Edit....
  4. Add the New Path:
    • Click New and then type the path to the folder where you saved wget.exe (e.g., C:\wget).
    • Click OK on all open windows to save the changes.

4. Add the Folder to the Windows PATH Using PowerShell (One Line)

To permanently add wget to your PATH using PowerShell, run PowerShell as Administrator and execute this single command:

[Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";C:\wget", [EnvironmentVariableTarget]::Machine)

Important notes:

  • You must run PowerShell as Administrator for this command to work
  • Replace C:\wget with the actual path where you placed your wget.exe file
  • This change is permanent and global, affecting all users and applications
  • Close any open command prompts and open a new one for the changes to take effect

5. Verify the Installation

To confirm that wget is installed and recognized by your system, open a new Command Prompt or PowerShell window and type:

wget --version

Installing wget on Linux

Installing wget on Linux is generally more straightforward than on Windows, as it is a standard utility that is often pre-installed on most distributions. If it isn't, you can easily install it using your distribution's built-in package manager. This process automatically handles the installation and system path configuration for you.

1. Check if wget is Already Installed

Before attempting to install it, you can check if wget is already available on your system. Open a terminal and run the following command:

wget --version

If wget is installed, this command will display the version number. If not, the system will inform you that the command was not found, and you can proceed with the installation instructions for your specific Linux distribution.

2. Installation Instructions for Linux

You will need administrative privileges to install new packages, so most commands are prefixed with sudo.

For Debian, Ubuntu, and Derivatives

For distributions that use the APT package manager (like Debian, Ubuntu, and Linux Mint), use the following commands.

  1. Update your package list: It's good practice to ensure your package manager has the latest list of available software.
    sudo apt update
    
  2. Install wget:
    sudo apt install wget
    

    Alternatively, on older systems, you might use apt-get.

For RHEL, CentOS, and older Fedora

For distributions based on Red Hat that use the YUM package manager (like RHEL, CentOS, and older versions of Fedora), run this command:

sudo yum install wget

For Fedora (22 and newer)

Newer versions of Fedora use the DNF package manager. Use the following command to install wget:

sudo dnf install wget

3. Verify the Installation

After the installation is complete, run the verification command again to confirm that wget is ready to use:

wget --version

Unlike the manual steps required for Windows, the Linux package manager automatically places the wget executable in a directory that is already part of the system's PATH. No further configuration is needed, and you can use the wget command from any location in your terminal.

Installing wget on macOS

On macOS, wget is not installed by default, but you can install it using a package manager like Homebrew. This is the most common and recommended method.

1. Install Homebrew (if you don't have it)

Homebrew is a package manager for macOS that simplifies the process of installing software. If you don't already have it, you can install it with a single command.

  1. Open the Terminal: You can find the Terminal application in your Applications/Utilities folder, or by searching for "Terminal" using Spotlight (Cmd + Space).
  2. Install Homebrew: Paste the following command into your Terminal and press Enter. This script will download and install Homebrew on your system.
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

    The installer will guide you through the process and may ask for your password to complete the installation.

2. Install wget

Once Homebrew is set up, you can install wget with a simple command.

  1. Update Homebrew: It's a good practice to update Homebrew to ensure you get the latest versions of packages.
    brew update
    
  2. Install wget: Now, use Homebrew to install wget.
    brew install wget
    

    Homebrew will automatically handle the download, installation, and any necessary dependencies. It will also add wget to your system's PATH, so you can run it from any directory.

3. Verify the Installation

To make sure wget was installed correctly, you can check its version.

  1. Open a new Terminal window or use the existing one.
  2. Run the following command:
    wget --version
    

If the installation was successful, this command will display the version of wget that was installed.