Install Nmap on Raspberry Pi

Install Nmap on Raspberry Pi

Nmap is a command line tool for network scanning and security auditing. Nmap allows to find what devices are connected to the network, what services are available and what operating systems are running on these devices, which ports are open, etc.

This tutorial describes how to install Nmap on Raspberry Pi.

Connect to Raspberry Pi via SSH and make sure the package lists are up-to-date:

sudo apt update

To install Nmap, execute the command:

sudo apt install -y nmap

To verify whether the installation has completed successfully, check version of Nmap:

nmap --version

Now we can use Nmap. Run nmap command and provide the IP address of a network device as argument:


Command prints which ports are open and what services are running on that device:

Nmap scan report for
Host is up (0.0019s latency).
Not shown: 999 filtered ports
80/tcp open  http

Nmap done: 1 IP address (1 host up) scanned in 4.38 seconds

Let's say local network is and you want to scan it, run the command:


Use the following command if you decided to completely uninstall Nmap:

sudo apt purge --autoremove -y nmap

Leave a Comment

Cancel reply

Your email address will not be published.