How To Install wget on CentOS 7

In this tutorial we learn how to install wget on CentOS 7. wget is A utility for retrieving files using the HTTP or FTP protocols

Introduction

In this tutorial we learn how to install wget on CentOS 7.

What is wget

GNU Wget is a file retrieval utility which can use either the HTTP or FTP protocols. Wget features include the ability to work in the background while you are logged out, recursive retrieval of directories, file name wildcard matching, remote file timestamp storage and comparison, use of Rest with FTP servers and Range with HTTP servers to retrieve files over slow or unstable connections, support for Proxy servers, and configurability.

We can use yum or dnf to install wget on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install wget.

Install wget on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install wget using yum by running the following command:

sudo yum -y install wget

Install wget on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install wget using dnf by running the following command:

sudo dnf -y install wget

How To Uninstall wget on CentOS 7

To uninstall only the wget package we can use the following command:

sudo dnf remove wget

References

Summary

In this tutorial we learn how to install wget on CentOS 7 using yum and dnf.