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:

nmap 192.168.0.150

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

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

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

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

nmap 192.168.0.0/24

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.