How to install Nmap on Ubuntu 17.04

To install Nmap on Ubuntu 17.04

Nmap is a command-line network exploration tool and it supports ping scanning method so that it can determine online hosts, port scanning techniques and TCP/IP fingerprinting for remote device identification. It is really simple to install Nmap and in this article, you will learn about the method to install Nmap on on Ubuntu 17.04.

 

Installing Nmap

In order to install Nmap, it is very essential to add all its necessary repositories in your Ubuntu machine. You can execute this action by using ppa as follows.

root@linuxhelp:~# add-apt-repository ppa:pi-rho/security
A place for security-related packages

 Terminal Objective #1: Make current builds available to the latest LTS and the latest few normal releases
 Terminal Objective #2: Make wilder packages behave in a system-installed way
 Terminal Objective #3: Maximize the use of the toolchain' s hardening capabilities for all packages
 Terminal Objective #4: Make packages debian-friendly without being too debiany
More info: https://launchpad.net/~pi-rho/+archive/ubuntu/security
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keybox ' /tmp/tmpox0wvgpd/pubring.gpg'  created
gpg: /tmp/tmpox0wvgpd/trustdb.gpg: trustdb created
gpg: key CC892FC6779C27D7: public key " Launchpad PPA for pi-rho"  imported
gpg: Total number processed: 1
gpg: imported: 1
OK

 

 

Once it is added, you shall update your system. Run the following command for the same purpose.

root@linuxhelp:~# apt-get update
Hit:1 http://in.archive.ubuntu.com/ubuntu zesty InRelease
Hit:2 http://in.archive.ubuntu.com/ubuntu zesty-updates InRelease
Hit:3 http://in.archive.ubuntu.com/ubuntu zesty-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu zesty-security InRelease
Hit:5 http://ppa.launchpad.net/js-reynaud/kicad-4/ubuntu zesty InRelease
Get:6 http://ppa.launchpad.net/pi-rho/security/ubuntu zesty InRelease [15.4 kB]
Get:7 http://ppa.launchpad.net/pi-rho/security/ubuntu zesty/main amd64 Packages [2,036 B]
Get:8 http://ppa.launchpad.net/pi-rho/security/ubuntu zesty/main i386 Packages [2,036 B]
Get:9 http://ppa.launchpad.net/pi-rho/security/ubuntu zesty/main Translation-en [1,620 B]
Fetched 21.1 kB in 8s (2,522 B/s)
Reading package lists... Done

 

Now is the time to install Nmap. Kick start the installation process by running the following command.

root@linuxhelp:~# apt-get install nmap
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libblas-common libblas3 liblinear3 ndiff python-bs4 python-chardet
python-html5lib python-lxml python-pkg-resources python-six
python-webencodings
Suggested packages:
liblinear-tools liblinear-dev python-genshi python-lxml-dbg python-lxml-doc
python-setuptools
The following NEW packages will be installed:
libblas-common libblas3 liblinear3 ndiff nmap python-bs4 python-chardet
python-html5lib python-lxml python-pkg-resources python-six
python-webencodings
.
.
.
.
Setting up liblinear3:amd64 (2.1.0+dfsg-2) ...
Setting up python-webencodings (0.5-2) ...
Setting up python-chardet (2.3.0-2) ...
Setting up nmap (7.40-1) ...
Setting up ndiff (7.40-1) ...
Setting up python-html5lib (0.999999999-1) ...
Processing triggers for libc-bin (2.24-9ubuntu2) ...

 

< ads>

 

Once the Nmap application is installed, you can check if it is installed properly. You shall simply run a command to check its version. If the version of the application is displayed properly, then it indicates that your Nmap application is proper.

root@linuxhelp:~# nmap --version

Nmap version 7.40 ( https://nmap.org )
Platform: x86_64-pc-linux-gnu
Compiled with: liblua-5.3.3 openssl-1.0.2g libpcre-8.39 libpcap-1.8.1 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: epoll poll select

With this, the installation of Nmap comes to an end.

Tag : nmap Ubuntu
Comment
ralnachogmez
Jan 16 2018
Hello! Thank you very much for your post. I have a question, why on earth nmap would need libblas* libraries for Debian/Ubuntu? libblas are linear algebra subprograms libraries, not related at all to network scanning (AFAIK). On other systems like Red Hat or SuSE, nmap don't depend on them. Regards...
Add a comment
FAQ
Q
How to Scan OS information and Traceroute in linux?
A
By using the following command to Scan OS information and Traceroute

# nmap -A 192.168.7.7
Q
Where to Enabling OS Detection with Nmap in linux?
A
you can execute the following command to Enabling OS Detection with Nmap in linux

# nmap -O 192.168.7.7
Q
How to install nmap package for fedora?
A
use the following command to install nmap

# dnf install nmap
Q
How to scan subnet or Iprange in linux?
A
execute the below command to see iprage

# nmap 192.168.1.5
Q
I don't want full ips in a subnet to be scanned some to be avoided?
A
Use exclude option for it (for example nmap 192.168.7.* --exclude 192.168.7.11)