I am a new Red Hat Enterprise Linux (RHEL) 8 user. How do I install wget on RHEL 8 using the dnf command?

Introduction – GNU Wget is a free and open source software package for getting files using HTTP, HTTPS, and FTP Internet protocols. The GNU/wget might not be installed on your RHEL 8 based system. For example, if you try to use the wget command on RHEL 8, you will get an error that read as follows:

bash: wget: command not found

This page explains how to install wget on RHEL 8 using yum command/wget command.

How to install wget on RHEL 8

The procedure to install wget command is as follows on RHEL 8:

  1. Open a terminal window.
  2. Search for wget package on Red Hat Enterprise Linux 8, run:
    sudo dnf search wget
  3. Type the following yum/dnf to install wget on RHEL 8:
    sudo dnf install wget
  4. Verify install by downloading file using wget:
    wget https://www.cyberciti.biz/files/hello-linux-module.zip
  5. Check wget version by running:
    wget --version

Let us see all commands and steps in details to install wget in RHEL 8.

Installing wget command on RHEL 8 (Red Hat Enterprise Linux)

First try to locate wget package, run:
$ sudo dnf search wget
$ sudo yum search wget

How to search for wget on RHEL 8
Searching for wget and other packages on RHEL 8

Type the following yum command or dnf command
$ sudo dnf install wget
$ sudo yum install wget

How to install wget on RHEL 8 using dnf command
Installing wget on RHEL 8 using the dnf command

How to test wget command

The syntax is
wget url
wget https://url/file
wget http://url
wget [options] url

How to download a single file using wget

Run the following command:
$ wget https://www.cyberciti.biz/files/tw_cli.8.html
$ wget ftp://ftp.freebsd.org/pub/sys.tar.gz
$ wget -O output.file https://www.cyberciti.biz/files/tw_cli.8.html

You can limit download speed as well:
wget --limit-rate=50k url
It is possible to set username and password while downloading files from password protected area:
wget --http-user=vivek --http-password=Secrete https://url-domain/file.tar.gz
For more info see “Linux wget: Your Ultimate Command Line Downloader”

How to resume broken downloads with wget

Again the syntax is as follows:
wget -c url
wget --continue url
wget --continue [options] url


This page explpained how to install the wget command using the dnf command or yum command. Further, it also demonstrated basic usage of the wget for command line user. For more info see GNU/wget homepage here.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.