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:
- Open a terminal window.
- Search for wget package on Red Hat Enterprise Linux 8, run:
sudo dnf search wget
- Type the following yum/dnf to install wget on RHEL 8:
sudo dnf install wget
- Verify install by downloading file using wget:
- Check wget version by running:
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
Type the following yum command or dnf command
$ sudo dnf install wget
$ sudo yum install wget
How to test wget command
The syntax is
wget [options] url
How to download a single file using wget
Run the following command:
$ wget https://sxi.io/files/tw_cli.8.html
$ wget ftp://ftp.freebsd.org/pub/sys.tar.gz
$ wget -O output.file https://sxi.io/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”
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.