How to Install Nmap in Cygwin

By Scott McMahon

Updated September 28, 2017

Nmap is a software program for scanning a network for security vulnerabilities and mapping the structure of a network. It can be useful for generating a topography of your network or searching for security holes you may have inadvertently left open. Although Nmap is a Linux application, you can run it on Windows through Cygwin.

Download WinPCAP from and install it on your system. Accept all of the default installation options.

Download Nmap for Windows from the website.

Extract the contents of the Nmap zip file to your desktop, then double click the extracted folder to open it.

Double-click the "nmap" folder inside of the folder you just opened from your desktop. There are two levels of folders here, and you must open both.

Press "Ctrl" and "A" on your keyboard to select all the files in the folder, then press "Ctrl" and "C" to copy them.

Open the Start menu and type "c:\cygwin\usr\local\bin" without quotation marks in the Search bar. Press "Enter" to open this folder. If you installed Cygwin to a nondefault location, replace "C:\cygwin" with the path to your Cygwin folder.

Press "Ctrl" and "V" on the keyboard to paste the Nmap files into the Cygwin bin directory.

Open the Start menu and type "cygwin." Select "Cygwin" from the list of results to open it.

Type "nmap --version" to display the Nmap version. The program is now installed.