About
Nmap scans a network for live hosts and the services they expose. Use it only on machines you own or have written permission to test. It handles version detection, OS fingerprinting and scripted checks.
Install it
pkg install nmap
Run this inside Termux. If the package is already present, pkg will say so and
do nothing.
Commands worth knowing
6 of the invocations you will actually reach for. Tap the copy button to put one on your clipboard.
nmap -sV -p 22,80,443 192.168.1.10 Probe the three listed ports. Prints the service and version on each. nmap -sn 192.168.1.0/24 Find which addresses on your subnet are up. No ports get scanned. nmap -sS -p- 192.168.1.10 Sweep all 65535 TCP ports. Catches services on odd numbers. nmap -A -T4 192.168.1.10 Aggressive detection: OS fingerprinting, version probes and default scripts. Run it only on a target you are authorised to test. nmap -sU -p 53,123,161 192.168.1.10 Check common UDP services: DNS, NTP and SNMP. A TCP-only sweep misses these. nmap -oN scan.txt -sV 192.168.1.10 Write a version scan to a readable file. Easy to review or share later. Worked example
Run nmap -sV -p 22,80 192.168.1.10 and this is what you should see.
$ nmap -sV -p 22,80 192.168.1.10
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 9.3p1
80/tcp open http nginx 1.24.0
Service detection performed. This names the software and release behind each open port.
Developed by
Gordon Lyon (Fyodor) and the Nmap Project · released under Nmap Public Source License.