Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Install Nmap on Ubuntu

Install the network scanner with APT or Snap, then run your first scan.

VPS and Cloud Servers1 min read4 steps2 screenshots
Note: Scan only networks and hosts that you own or may test.

What Nmap does

  1. Network discovery. Finds devices and services.
  2. Port scanning. Shows open ports and the programs behind them.
  3. OS detection. Guesses the operating system of a host.
  4. Vulnerability checks with scripts.

Method 1: APT

Update the package list:

sudo apt update

Install Nmap:

sudo apt install nmap
Installing Nmap with APT

Method 2: Snap

Install snapd if needed:

sudo apt install snapd

Install Nmap:

sudo snap install nmap

Check the install

nmap --version
The Nmap version

First scans

nmap localhost
nmap 192.168.1.10
nmap -p 22,80,443 example.com
nmap -sV 192.168.1.10
  • -p chooses ports.
  • -sV finds the version of services.
  • -A turns on OS detection, version detection and scripts (needs sudo for some features).

Scan a network range:

nmap 192.168.1.0/24

Quick recap

  • sudo apt install nmap.
  • Check with nmap --version.
  • Scan only your own systems.