How to Install Nmap From Source

Author: Royce Davis Posted In Tools On: 2016/09/28 1 comment
How To Install Nmap

Nmap is a network mapping tool used during the Information Gathering phase of a network penetration testing engagement. It is completely free and open source. Click on the following link for more information about the Nmap Project. In this step-by-step tutorial you will learn how to install Nmap from source on an Ubuntu Linux machine.

Most modern Linux distributions come with a pre-packaged version of Nmap that can be installed with a simple command. However, we recommend compiling from source for two main reasons. The first reason is that it ensures the latest available release is being used. The second (and probably the most important) is the amount of NSE Scripts (which are extremely useful!) is constantly growing so keeping up to date with the bleeding edge version of Nmap is critical.

Install Nmap Dependencies: How To Install Nmap

First you will need to obtain the necessary dependencies in order to install nmap successfully.

$ sudo apt-get install git wget build-essential checkinstall libpcre3-dev libssl-dev

Clone The Git Repository: How To Install Nmap

Next you’ll want to check out the source repository from the Nmap Github page in order to install nmap from the latest available version.

$ git clone

Configure Nmap Installation: How To Install Nmap

Next run the configuration script. If you see any errors or warnings make sure you go back and install the necessary libraries from Step 1.

$ ./configure

Compile The Build Files: How To Install Nmap

Next run make and then make install to compile and install nmap on your system.

$ make && make install

Verify Your Installation: How To Install Nmap

When you are all done you should be able to run nmap with the “-V” option to see that you are running the latest version from source. At the time this article was published the command output would have looked like this. Thats all there is to it, now you know how to install nmap from source. If you have any questions leave a comment below.

$ nmap -V

Nmap version 7.25SVN ( )
Platform: x86_64-unknown-linux-gnu
Compiled with: nmap-liblua-5.3.3 openssl-1.0.1f libpcre-8.31 nmap-libpcap-1.7.3 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: epoll poll select

Share this article

Posted In:  Tools
1  comment
1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Share This

Follow Pentest Geek


Recent Posts

Free Course

Penetration Testing



Web Application Hacking