Install nmap Software For Scanning Network
Written by vaheeD on January 6, 2013
Nmap is a command line tool for network exploration or security auditing.It supports ping scanning (determine which hosts are up), many port scanning techniques (determine what services the hosts are offering), and TCP/IP fingerprinting (remote host operating system identification).
Installation Debian / Ubuntu
To install nmap for Debian and Ubuntu Linux based server systems type the following apt-get command:
$ sudo apt-get install nmap
Sample outputs:
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: nmap 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded. Need to get 1,643 kB of archives. After this operation, 6,913 kB of additional disk space will be used. Get:1 http://mirrors.service.networklayer.com/ubuntu/ precise/main nmap amd64 5.21-1.1ubuntu1 [1,643 kB] Fetched 1,643 kB in 0s (16.4 MB/s) Selecting previously unselected package nmap. (Reading database ... 56834 files and directories currently installed.) Unpacking nmap (from .../nmap_5.21-1.1ubuntu1_amd64.deb) ... Processing triggers for man-db ... Setting up nmap (5.21-1.1ubuntu1) ...
Examples
To find the nmap version, enter:
# nmap -V
OR
# nmap --version
Sample outputs:
Nmap version 5.21 ( http://nmap.org )
Installation CentOS / RHEL
To install nmap on RHEL based Linux distributions, type the following yum command:
# yum install nmap
Sample outputs:
Loaded plugins: protectbase, rhnplugin, security 0 packages excluded due to repository protections Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package nmap.x86_64 2:5.51-2.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: nmap x86_64 2:5.51-2.el6 rhel-x86_64-server-6 2.8 M Transaction Summary ================================================================================ Install 1 Package(s) Total download size: 2.8 M Installed size: 0 Is this ok [y/N]: y Downloading Packages: nmap-5.51-2.el6.x86_64.rpm | 2.8 MB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : 2:nmap-5.51-2.el6.x86_64 1/1 Verifying : 2:nmap-5.51-2.el6.x86_64 1/1 Installed: nmap.x86_64 2:5.51-2.el6 Complete!
How do I use nmap command?
To find out nmap version, run:
# nmap --version
Sample outputs:
Nmap version 5.51 ( http://nmap.org )
Installation OpenBSD
Use pkg_add command to install software package called nmap under OpenBSD operating system. First, you must set the PKG_PATH environment variable as follows:
export PKG_PATH=http://mirror.esc7.net/pub/OpenBSD/`uname -r`/packages/`machine -a`/
Type the following pkg_add command to install nmap tool. The -v flag was used to give a more verbose output. This option is not needed but it is helpful for debugging and was used here to give a little more insight into what pkg_add is actually doing under OpenBSD:
# pkg_add -v nmap
Sample outputs:
nmap-6.01: ok
Examples
To find out nmap version, enter:
# nmap --version
Sample outputs:
Nmap version 6.01 ( http://nmap.org ) Platform: i386-unknown-openbsd5.2 Compiled with: liblua-5.1.5 openssl-1.0.0f libpcre-8.30 libpcap-(OpenBSD libpcap) nmap-libdnet-1.12 ipv6 Compiled without:
Installation Mac OSX
To install nmap for Mac OSX based server systems type the following port command:
$ sudo port install nmap
Sample outputs:
---> Computing dependencies for nmap .. .. ..
Examples
To find the nmap version, enter:
# nmap -V
OR
# nmap --version
Sample outputs:
Nmap version 6.25 ( http://nmap.org )
Platform: x86_64-apple-darwin10.8.0
Compiled with: liblua-5.2.1 openssl-0.9.7l nmap-libpcre-7.6 nmap-libpcap-1.2.1 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: kqueue poll select