How to Install Nmap on Windows

This post summarizes the steps to install Nmap on Windows.

Introduction

Nmap is a useful command-line tool for network scanning. While I had used it on Linux before, I had never installed or used it on Windows.

I'll document the process of installing Nmap on Windows for future reference.

Note: This article was translated from my original post.

Installing Nmap on Windows

Installing via Chocolatey

If you use the Chocolatey package manager, you can install Nmap easily with the following steps:

  1. Run Command Prompt as Administrator.
  2. Install Nmap using choco install nmap.
  3. Verify the installation with nmap --version.

Let's go through each step.

1. Run Command Prompt as Administrator

Search for "Command Prompt" in the Windows search bar, right-click it, and select Run as administrator.

If you don't run it as an administrator, the installation may fail due to insufficient permissions.

2. Install Nmap

Once Command Prompt is open, run the following command to install Nmap:

>choco install nmap
Chocolatey v0.10.15
Installing the following packages:
nmap
By installing you accept licenses for the packages.

nmap v7.80 [Approved]
nmap package files install completed. Performing other installation steps.
The package nmap wants to run 'chocolateyInstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): Y

Installing nmap...
nmap has been installed.
nmap installed to 'C:\Program Files (x86)\Nmap'
  nmap may be able to be automatically uninstalled.
Environment Vars (like PATH) have changed. Close/reopen your shell to
 see the changes (or in powershell/cmd.exe just type `refreshenv`).
 The install of nmap was successful.
  Software installed as 'exe', install location is likely default.

Chocolatey installed 1/1 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

3. Verify the Installation

Reopen Command Prompt and run nmap --version.

>nmap --version
Nmap version 7.80 ( https://nmap.org )
Platform: i686-pc-windows-windows
Compiled with: nmap-liblua-5.3.5 openssl-1.0.2s nmap-libssh2-1.8.2 nmap-libz-1.2.11 nmap-libpcre-7.6 Npcap-0.9982 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: iocp poll select

If you see an output like this, the installation was successful.

Installing via the Nmap Installer

You can also install Nmap using the official installer.

1. Download the Installer

Visit the official Nmap download page and download the Windows installer:

Download the Free Nmap Security Scanner for Linux/Mac/Windows

2. Run the Installer

Open the downloaded installer.

When prompted, allow the installer to make changes to your device.

3. Follow the Installation Wizard

Follow the installation wizard steps:

Click "I Agree"

Click "Next >"

Click "Install"

4. Install Npcap

During installation, the Npcap installation window will appear. Follow these steps:

Click "I Agree"

Click "Install"

After installation, click "Next >"

Click "Finish"

5. Complete the Nmap Installation

Once Npcap is installed, return to the Nmap installer and complete the installation:

Click "Next >"

Click "Next >"

Click "Finish"

6. Verify the Installation

Open Command Prompt and run nmap --version.

>nmap --version
Nmap version 7.91 ( https://nmap.org )
Platform: i686-pc-windows-windows
Compiled with: nmap-liblua-5.3.5 openssl-1.1.1h nmap-libssh2-1.9.0 nmap-libz-1.2.11 nmap-libpcre-7.6 Npcap-1.00 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: iocp poll select

If you see an output like this, the installation was successful.

Conclusion

This post covered how to install Nmap on Windows.

While installing Nmap on Linux is straightforward using a package manager, I also wanted to document the process for Windows.

I hope this guide helps someone out!

[Related Posts]

en.bioerrorlog.work

References