Nmap releases now include the Zenmap graphical user interface for Nmap. If you used the Nmap installer and left the Zenmap field checked, there should be a new Zenmap entry on your desktop and Start Menu. Click this to get started. While many users love Zenmap, others prefer the traditional command-line approach to executing Nmap. Here are detailed instructions for users who are unfamiliar with command-line interfaces:
1、Make sure the user you are logged in as has administrative privileges on the computer (user should be a member of the administrators group).
2、Open a command/DOS Window. Though it can be found in the program menu 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 here.
3、Change to the directory you installed Nmap into. You can skip this step if Nmap is already in your command path (the Zenmap isntaller adds it there by default). Otherwise, type the following commands.
c:
cd "\Program Files (x86)\Nmap"
On Windows releases prior to Windows 7, specify \Program Files\Nmap instead. The directory will also be different if you chose to install Nmap in a non-default location.
4、Execute nmap.exe. Figure 2.1 is a screen shot showing a simple example.
Figure 2.1. Executing Nmap from a Windows command shell
If you execute Nmap frequently, you can add the Nmap directory (c:\Program Files (x86)\Nmap by default on Windows 7) to your command execution path. The exact place to set this varies by Windows platform. On my Windows XP box, which installs Nmap in c:\Program Files\Nmap, 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 (e.g. c:\Program Files\Nmap) 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.