Introduction to Nmap | Nmap series part-1

Introduction to Nmap

What is Nmap?

Nmap is known as Network Mapper. It is an open-source Linux command line tool that’s used to scan IP addresses and ports in a network and to detect installed applications. It is one of the famous network scanning tool used by penetration testers which allows us to detect network vulnerabilities in the system and many more.

Types of Nmap Scans

Generally, Nmap scans can be divided into two types:

  1. Host discovery: In host discovery, we find out which devices are up on the network, more specifically, the IP addresses of the devices. We do this by scanning a range of IP addresses with Nmap.
  2. Port scan: In port scan, we target one or multiple IP addresses on the network and find out what ports are open i.e., which ports have running applications that are accepting connections.

Then there’s something called as banner grabbing in Nmap which is actually shows the version number of the services, application or the particular OS which you’re scanning in. These are known as:

  1. Service detection
  2. OS detection

Types of Nmap Commands

Nmap help command

It shows all the lists of available commands which can be used

nmap -h

Basic scan of IP address using Nmap

It scans all the well known ports


Find active or live hosts with in a range of IP

It scans all the active or live hosts in the range of IP

nmap -sn


Scan a particular range of IP

It scans from the specific IP to specific IP which you have mentioned. For an example if you will mention from then it will scan every IP like and so on.

nmap -sn


Scan a single Port

It scans only a single port which you have mentioned

nmap -p 22

Scan specific Ports

It scans only specific ports which you have mentioned

nmap -p 22,80


Scan specific range of Ports

It scans specific range of ports which you have mentioned

nmap -p 20-30


Scan all ports in a single command

It scans all the ports(0-65535) in a network or IP

nmap -p- (it might take some time to scan all the ports)


Fast scan 

It scans all the 100 well known ports

nmap -p


Verbose mode

It shows the details in terminal which is about to run in the live scanning process.

nmap -v

Scan specific domains in a single command

It helps to scan multiple domains at the same time




If you really like this post then give your reaction and don’t forget to share with others.


Thank you for reading this and have a nice stay there!