How to install Nmap in Termux – Latest Commands 2025

Rate this post

Are you looking for the latest methods and commands to install Nmap in Termux? Well, you are in the right place because in this article I will give you the latest commands to install nmap in Termux. I will also explain how to use nmap in termux and provide you some basic nmap commands so that you can use nmap in Termux easily.

How to install nmap in Termux 2025
How to install nmap in Termux 2025

What is Nmap?

Nmap short for network mapper is a free and open-source powerful tool for network scanning and network security. It helps to scan hosts and services on a computer network. Nmap scans a network and finds information such as connected devices, open and closed ports, services, operating systems, and more.

Nmap is built for computers but with the help of Termux terminal application, you can run Nmap on an Android device.

Let’s see how to install and use nmap in termux even without root access.

how to install nmap in termux without root

You can install nmap in Termux in a single command without rooting your Android device, but make sure that you are using the latest version of Termux.

Below I have provided the latest commands to install Nmap in Termux:

  • apt update
  • apt upgrade -y
  • pkg install nmap
pkg install nmap
pkg install nmap

You can easily install Nmap in Termux just by typing these commands even if your device is not rooted.

I hope Nmap is successfully installed in your Termux without any errors. If you are facing any errors in the install process, I have listed some common errors along with their solutions in the common errors and fixing section at the end of this article.

READ ALSO  how to install tool x in termux

How to check if Nmap is working in Termux

After installing Nmap, you might want to check if it is working or not. To check, you can simply type this command in Termux:

nmap
Nmap successfully installed
Nmap successfully installed

If Nmap is installed properly, you will see some information and help commands on the screen. That means Nmap is ready to use. If it says “command not found,” it means something went wrong during installation.

How to use Nmap in Termux

Now that Nmap is installed, you can start using it. Don’t worry, I will show you simple examples.

Let’s say you want to scan a website or an IP address. Just type:

nmap example.com

Or you can scan a local IP address:

nmap 192.168.1.1

This will scan and show you the open ports on that IP address.

Basic Nmap Commands for Beginners

Here are some simple Nmap commands that you can try:

  1. To scan a website or IP:
nmap example.com
  1. To scan multiple IPs:
nmap 192.168.1.1 192.168.1.2
  1. To scan a full network:
nmap 192.168.1.0/24
  1. To scan with more information (Aggressive scan):
nmap -A example.com
  1. To check open ports only:
nmap -F example.com

These are simple and useful commands. You can try them one by one and see what results you get.

Common Errors and How to Fix Them

Sometimes Nmap may not install properly or may not work. Here are some common problems and their solutions:

  • Error: command not found
    Solution: This means Nmap was not installed. Try running the install command again:
    pkg install nmap
  • Error: no internet connection
    Solution: Make sure your phone is connected to the internet while using Termux.
  • Error: repository not found
    Solution: Run these two commands to fix the repository: apt update apt upgrade -y
  • Package is outdated or broken
    Solution: Try to uninstall and reinstall Termux from F-Droid (recommended). Sometimes the Play Store version does not work properly.
READ ALSO  Nmap Termux: Installation and Basic Usage Commands

Final Words

Nmap is a very helpful tool for scanning networks and learning about network security. Even though it is made for computers, we can now use it on Android using Termux without root. With just three commands, you can install Nmap easily. After that, you can start scanning IPs, websites, and networks. This is good for learning and testing your own network.

Just remember: use Nmap only for educational purposes. Do not scan other people’s networks without permission. That is illegal.


proud owner of termuxcommands.com, Assam native. Tech enthusiast, sharing Termux and Linux expertise. Simplifying tech for all—from beginners to pros. Join me on this knowledge-sharing adventure!

Leave a Comment