How to Install Nmap on Ubuntu 20.04

 

 

 

 

This is an open-source and free network scanner developed by Gordon Lyon. Network discovery is carried out using Nmap, which sends packets and then analyzes the results. The Nmap program provides several features for examining computer networks, such as discovering hosts and detecting services and operating systems. The program is used by network administrators to discover network vulnerabilities. Using this tool, you can scan all your network hosts, determining what services they offer. Let’s get started with the installation.

 

 

 

 

 

 

 

Step 1: Configure VPSie cloud server

 
  1. Sign in to your system or register a newly created one by logging in to your VPSie account. 
  2. Connect by SSH using the credentials we emailed you.
  3. Once you have logged into your CenOS instances and update your system.

 

 

 

 

Step 2: Installing Nmap

 

 

 

 

Installing Nmap on Ubuntu via apt

 

 

 

 

 

Use this command to update repository index,

 

# sudo apt update

 

 

Install Nmap,

 

 

# sudo apt install nmap

 

 

Your internet speed will determine how long it takes to install. If the installation is complete, you can verify it and check the Nmap version by running the command below,

 

 

 

# nmap --version

 

# nmap --version
Nmap version 7.80 ( https://nmap.org ) Platform: x86_64-pc-linux-gnu Compiled with: liblua-5.3.3 openssl-1.1.1d nmap-libssh2-1.8.2 libz-1.2.11 libpcre-8.39 libpcap-1.9.1 nmap-libdnet-1.12 ipv6 Compiled without: Available nsock engines: epoll poll select

 

 

 

 

 

Installing Nmap using Ubuntu source code

 

 

 

 

 

The package build-essential should be installed. Run the following command,

 

 

# sudo apt install build-essential

 

 

 

You can download Nmap’s latest version in tar.bz2 format from Nmap’s official Downloads page. Alternatively, you can download 7.92 from the Nmap website using the following command.

 

 

# wget https://nmap.org/dist/nmap-7.92.tar.bz2

 

 

You can extract the tar.bz2 archive using the following command,

 

 

 

# tar xf nmap-7.92.tar.bz2

 

 

 

Browse to the extracted directory,

 

 

# cd nmap-7.92/

 

 

 

Check that the system meets the prerequisites to install the software by running the configure script. This will require you to install the prerequisites if it indicates an error.

 

 

# sudo ./configure

 

 

 

 

The following view will appear on your Terminal if the configuration was successful.


 

            .       .
            \`-"'"-'/
             } 6 6 {
            ==. Y ,==
              /^^^\  .
             /     \  )  Ncat: A modern interpretation of classic Netcat
            (  )-(  )/
            -""---""---   /
           /   Ncat    \_/
          (     ____
           \_.=|____E
Configuration complete.

          :================:
         /||# nmap -A _   ||
        / ||              ||
       |  ||              ||
        \ ||              ||
          ==================
   ........... /      \.............
   :\        ############            \
   : ---------------------------------
   : |  *   |__________|| ::::::::::  |
   \ |      |          ||   .......   |
     --------------------------------- 8

  NMAP IS A POWERFUL TOOL -- USE CAREFULLY AND RESPONSIBLY

 

 

 

Build Nmap software using the make command,

 

 

 

# sudo make

 

 

 

Install Nmap by running the following command,

 

 

 

# sudo make install

 

 

The following lines will appear at the end of the output once Nmap is installed.

 

 

/usr/bin/install -c -c -m 644 docs/nping.1 /usr/local/share/man/man1/
NPING SUCCESSFULLY INSTALLED
make[1]: Leaving directory '/root/nmap-7.92/nping'
NMAP SUCCESSFULLY INSTALLED

 

 

 

 

Check the installed version of Nmap,



# nmap --version

 

 

 

 

 

Step 2: Uninstalling Nmap

 

 

 

 

Nmap can be removed from an Ubuntu system using the following command,

 

 

# sudo apt remove nmap

 

 

 

It is necessary to remove all configuration files associated with Nmap execute the command,

 

 

# sudo apt purge nmap

 

 

 

You can remove Nmap as follows if you have installed it from the source,



# cd nmap-7.91/

 

 

Then,

 

sudo make uninstall

 





That’s all for now, I hope you’ve found this informational

 

 

 

 

 

 

 

 

Try VPSie for free today!