nmap in Cygwin - seamlessly

  1.  Download and install the “self-installer” and WinPcap and Install WinPcap when asked by the Nmap installer.
  2. in cygwin:

    echo 'alias nmap="/cygdrive/c/Program Files (x86)/Nmap/nmap.exe"' >> ~/.bash_profile
  3. close and reopen your Cygwin window

Troubleshooting nmap on Cygwin

  • errors about interface, try running Cygwin as Administrator (right click on Cygwin icon).
  • to find interface names available to nmap nmap --iflist

Test nmap Cygwin install

$ nmap

Starting Nmap 7.12 ( https://nmap.org )  Nmap scan report for google-public-dns-a.google.com ( Host is up (0.0092s latency). Not shown: 998 filtered ports PORT STATE SERVICE 53/tcp open domain 443/tcp open https

Nmap done: 1 IP address (1 host up) scanned in 7.41 seconds


  • to find servers with a particular port open on a subnet, try this Python code that scans for servers without nmap.
  • If you don’t install WinPcap when asked in the nmap installer, nmap would not give proper results (claimed no host existed at a known working IP address).




Leave a Comment