Nmap is one of the most popular network scanning tools used to discover devices, check open ports, and gather information about systems on a network. It is commonly used to scan networks, identify running services, and gather useful information about target systems. You can install Nmap in Termux and perform different network scanning commands directly from your Android device without root access.
Install Nmap in Termux
Run the commands below one by one to install Nmap and get it ready for network scanning on your Android device.
Update Termux packages.
pkg update && pkg upgrade -y
Install Nmap.
pkg install nmap -y
Check the installed version.
nmap --version
If the version information appears, Nmap has been installed successfully and is ready to use.
Nmap Basic Scanning Commands
After installing Nmap in Termux, you can use the following commands to perform different network scanning and reconnaissance tasks from your Android device.
Display the Nmap help menu.
nmap -h
Perform a basic scan on a target.
nmap example.com
Scan a specific port.
nmap -p 80 example.com
Scan multiple ports together.
nmap -p 80,443,8080 example.com
Perform a fast scan using commonly used ports.
nmap -F example.com
Perform a full port scan.
nmap -p- example.com
Detect running services and versions.
nmap -sV example.com
Attempt to detect the target operating system.
nmap -O example.com
Discover active devices connected to the local network.
nmap -sn 192.168.1.0/24
Scan UDP ports on the target.
nmap -sU example.com
Run an aggressive scan.
nmap -A example.com
Save scan results into a file.
nmap example.com -oN result.txt
Choose the command you want and Nmap will automatically perform the selected network scanning task and display the results inside the Termux terminal.



