Nmap (original) (raw)

Last Updated : 18 May, 2026

Nmap (Network Mapper) is an open-source tool used for network discovery, scanning and security auditing. It helps identify hosts, open ports, running services, operating systems and potential vulnerabilities, making it widely used in penetration testing and network troubleshooting.

Features of Nmap

Nmap offers a wide range of features to its users, including:

features_of_nmap

Features Of Nmap

Importance of Nmap

There are a few points that reflect the work of Nmap and provide many reasons to have Nmap on your network.

importance_of_nmap

Importance of Nmap

Installing Nmap on Kali Linux

Kali Linux usually comes with Nmap pre-installed, since it is one of the most commonly used penetration testing tools. However, if it is not installed or you want to update it to the latest version, you can do so with the following commands:

**1. Refresh the package index:

sudo apt update

**2. Install Nmap:

sudo apt install nmap -y

**3. Confirm the Installation:

nmap --version

file

Nmap Version

Nmap Examples

Here's a simple example of how to use Nmap for basic network scanning. We'll perform a basic host discovery and a port scan.

1. Scan a Single IP

**Command:

nmap 45.81.17.27

2. Scan a Subnet (CIDR Notation)

**Command:

nmap /24

3. Scan Targets from a File

**Command:

nmap -iL targets.txt

4. Exclude Specific Hosts

**Command:

nmap 192.168.1.0/24 --exclude 192.168.1.1

5. TCP SYN Scan (Stealth Scan)

**Command:

sudo nmap -sS

6. TCP Connect Scan

**Command:

nmap -sT

7. UDP Port Scan

**Command:

sudo nmap -sU

8. Host Discovery Only (Ping Scan)

**Command:

nmap /24 -sn

9. Skip Host Discovery (Force Port Scan)

**Command:

nmap -Pn

10. Disable DNS Resolution

**Command:

nmap 192.168.1.1 -n