Executing Nmap
- Make sure the user you are logged in as has
administrative privileges in the box (should be in the administrators group).
- Open a command/DOS Window. Though it can be
found in the program menu 11511u2017l tree, the simplest approach is to choose Start
-> Run and type cmd<enter>. Opening a Cygwin window (if you
installed it) by clicking on the Cygwin icon on the desktop works too,
although the necessary commands differ slightly from those shown below.
- Change to the directory you installed Nmap
into. Assuming the example directory name used in the install section
above, type the following commands.
c:
cd "\program
files\nmap-VERSION" (replace VERSION with the Nmap version number)
- Execute nmap.exe. Figure 2,
"Executing Nmap from a Windows command shell" is a screen shot showing
a simple example
Figure 2. Executing Nmap from a
Windows command shell
If you execute Nmap
frequently, you can the Nmap directory (c:\program files\nmap-VERSION in this case) to your command
execution path. The exact place to set this varies by Windows platform. On my
Windows XP box, I do the following:
- From the desktop, right click on My Computer and then click properties.
- In the System Properties window, click the Advanced tab.
- Click the Environment Variables button.
- Choose Path from the System variables section, then hit
edit.
- Add a semi-colon and then your Nmap directory
(such as c:\program
files\nmap-VERSION) to
the end of the value.
- Open a new DOS window and you should be able
to execute a command such as nmap scanme.nmap.org from any
directory.