Guides 11792 Published by

This quick‑start guide walks readers through installing Nmap on AlmaLinux 8, highlighting why the EPEL repository is essential and showing how to enable it with a single command. It then demonstrates using dnf to pull in the latest stable build, verifies that the binary exists and reports its version, and runs a simple localhost ping scan to confirm functionality. The author explains how Nmap can reveal hidden network issues after problematic updates or driver changes, offering practical troubleshooting insight. Finally, optional steps show how to add Nmap’s location to the PATH for easier future use.



Install Nmap on AlmaLinux 8: A Quick‑Start Guide

When a server goes silent after a kernel tweak or a new firewall rule, knowing how to scan it quickly can save hours of frustration. This article walks through the exact commands needed to get Nmap up and running on AlmaLinux 8 and explains why each step matters.

Why the EPEL Repository Matters

AlmaLinux’s default repositories don’t ship Nmap because it’s not part of the core distribution. The Extra Packages for Enterprise Linux (EPEL) repo contains the latest, stable build. If you skip this step, dnf will complain that the package is missing.

sudo dnf install epel-release -y

The -y flag auto‑answers “yes” to any prompts, which keeps the flow smooth and avoids those annoying pop‑ups.

Installing Nmap with DNF

Now that EPEL is enabled, installing is a one‑liner:

sudo dnf install nmap -y

DNF resolves dependencies automatically. If you see “Package nmap‑… not available,” it means the repo wasn’t refreshed; run dnf clean all && dnf makecache first.

Verifying the Installation

Confirm that the binary is in place and check the version to ensure you have a recent copy:

nmap --version

You should see something like Nmap 7.93 ( https://nmap.org ). A lower number might indicate an older, unsupported build that misses critical bug fixes.

Quick Test: Scanning Your Own Host

Run a simple ping scan against localhost to confirm everything works:

sudo nmap -sn 127.0.0.1

If you get “Host is up” and see open ports, Nmap is operational. This also double‑checks that the nmap binary has execute permissions for your user.

Why You’ll Need It After a Bad Update

Many users report that after a faulty driver update, their network interface goes haywire—ports appear closed when they’re actually open. Running Nmap right after an update can quickly reveal which services are still reachable and help pinpoint the culprit.

Optional: Adding Nmap to Your PATH for Convenience

If you prefer typing nmap from any directory, add its location to your shell’s PATH (usually /usr/bin/nmap). Most distributions already place it there, but if it isn’t:

export PATH=$PATH:/usr/local/bin

Add that line to ~/.bashrc or the relevant profile file for persistence.

That’s all. You now have a full‑featured network scanner on AlmaLinux 8 ready to diagnose any connectivity hiccup.