how to install nmap port scanner on android smartphone using termux - no root

Nmap :  

Nmap is a free and open-source network scanner created by Gordon Lyon. Nmap is used to discover hosts and services on a computer network by sending packets and analyzing the responses. Nmap provides a number of features for probing computer networks, including host discovery and service and operating system detection

  • Now,Let us install nmap on your android smartphone using termux.


  1. Termux  - Install Termux from Google playstore.
  2. nmap
After Installing Termux, 
  • Upgrade the Termux repo to the most recent version,using the command below(Not actually necessary - just to make sure you have the newest termux repository)
          pkg upgrade
pkg upgrade

Open Termux - Android Terminal Emulator App and install nmap on it using the command below:
pkg install nmap
pkg install nmap

To Test the successfull installation of nmap , type the command 'nmap' or 'nmap -V'

nmap -V

Now, its time to port scan your target ip and find the vulnerable ports,here are the simple commands to try yourself.

  • nmap - [TARGET_IP] - example: nmap
                                  This is a basic command to scan a range of most common vulnerable ports i.e like http(80),ftp(21),ssh(22),dns(53),telnet(23),File-sharing(139) etc.,

basic nmap command
  • nmap [TARGET_IP] -p 1-65535 - example: nmap -p 1-65535
                                   This command will scan all the ports (1-65535 ,i.e 'p' denotes the range of ports to scan )of the target ip.
  • nmap -Pn [TARGET_IP] -p 1-1024 - example: nmap -Pn -p 1-1024
                                  Try this command(-Pn) ,if the previous one failed to retrieve data ,this command will scan the target even if it is a firewalled device, like nmap can scan a range of ports even if your target ip blocks the ping requests etc.,
If this error occurs, try this command - nmap -Pn [TARGET_IP] 
  • You can also scan multiple ip - example: nmap or nmap,2 or /16 /24 etc.,

  • You can do lot more with nmap, simply type nmap -h to find more interesting available options or have a look into the documentation of nmap.

1 comment: