I'm trying to get Cygwin to show what ports my laptop has open but when I try to run it, it says the command isn't found.
This is the command I'm trying: nmap -v -A
<<IP address>>
I'm trying to get Cygwin to show what ports my laptop has open but when I try to run it, it says the command isn't found.
This is the command I'm trying: nmap -v -A
<<IP address>>
This blog post has some useful info about how to get this working. Have copied it below in case it ever goes away:
alias nmap="/cygdrive/c/Program\ Files\ \(x86\)/Nmap/nmap.exe"
. Note the \
and \(
are vital for Cygwin shell to interpret the command correctly.Depending on where you installed nmap to, it will be something like /cygdrive/c/Program Files (x86)/Nmap/nmap
. In the Windows command prompt (cmd), it will be c:\Program Files (x86)\Nmap\nmap
.
However, nmap isn't the best tool to discover listening ports in Linux and won't work at all in Windows. In cygwin, try this: netstat -ano|grep LISTEN
. In the Windows command prompt: netstat -ano|find "LISTEN"
. In Linux: netstat -anp|grep LISTEN
.