Nmap

Terminal Guide & Documentation

Nmap in Termux - Complete Installation and Usage Guide

What is nmap

Nmap (Network Mapper) is a free and open-source utility for network discovery and security auditing. Many systems and network administrators also find it useful for tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime. In Termux, it allows you to scan networks, discover hosts, and detect open ports directly from your Android device.

Prerequisites

Before installing Nmap, ensure your Termux setup meets these requirements:

  • Latest Termux: Ensure you are using the F-Droid version.
  • Updated Packages: Run package updates to avoid dependency issues.
  • Network Access: Nmap requires access to the network you intend to scan.

Installation Commands in Termux

Installing Nmap in Termux is straightforward as it's available in the official repositories.

1. Update Package Lists

Always update your repository cache first.

BASH - TERMINAL COPY CODE
pkg update && pkg upgrade -y

2. Install Nmap

Use the Termux package manager to install Nmap.

BASH - TERMINAL COPY CODE
pkg install nmap -y

3. Verify Installation

Check if Nmap is installed correctly by checking its version.

BASH - TERMINAL COPY CODE
nmap --version

Basic Usage & Examples

Here are some fundamental Nmap commands to get you started with network scanning.

Scan a Single IP or Domain

The most basic scan against a target.

BASH - TERMINAL COPY CODE
nmap 192.168.1.1

Scan a Network Range

Discover active hosts on a subnet.

BASH - TERMINAL COPY CODE
nmap 192.168.1.1-254

Detect Operating System and Services

Use the -A flag for aggressive scanning, including OS detection, version detection, script scanning, and traceroute.

BASH - TERMINAL COPY CODE
nmap -A example.com

Fast Scan

Scan fewer ports than the default scan for quicker results.

BASH - TERMINAL COPY CODE
nmap -F 192.168.1.1