How To Install nmap on CentOS 7

In this tutorial we learn how to install nmap on CentOS 7. nmap is Network exploration tool and security scanner

Introduction

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

What is nmap

Nmap is a utility for network exploration or security auditing. It supports ping scanning (determine which hosts are up), many port scanning techniques (determine what services the hosts are offering), and TCP/IP fingerprinting (remote host operating system identification). Nmap also offers flexible target and port specification, decoy scanning, determination of TCP sequence predictability characteristics, reverse-identd scanning, and more. In addition to the classic command-line nmap executable, the Nmap suite includes a flexible data transfer, redirection, and debugging tool (netcat utility ncat), a utility for comparing scan results (ndiff), and a packet generation and response analysis tool (nping).

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

Install nmap on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install nmap

Install nmap 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 nmap using dnf by running the following command:

sudo dnf -y install nmap

How To Uninstall nmap on CentOS 7

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

sudo dnf remove nmap

References

Summary

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