nmap on Ubuntu

Installing nmap on Ubuntu

In order to install nmap on Ubuntu, we will be using these commands at terminal:

$ sudo apt-get install nmap

Simple Scanning With nmap on Ubuntu

In terminal of your choosing, type(you should use your own ip address or ip address of network you wish to scan):

$ sudo nmap -sn

Whatever ip address you have must be followed by ‘/24’. It also helps to change last number to ‘0’. That will give us first possible ip address on that network. Using ‘/24’ informs our computer to scan from ip address ‘’ until it reaches and scans ‘’.

Diving Deeper Scanning With nmap on Ubuntu

If we remove our ‘-sn’ option, we can use nmap to scan ports on all of those devices we found above.


$ sudo nmap

Aggressively Scanning With nmap On Ubuntu

$ sudo nmap -A -T4

In this line of code, ‘-A’ option acts as an aggressive scan. This runs nmap’s operating system detection, version detection, script scanning, and traceroute detection.

There is a timing template set by ‘-T’ flag. From 0 to 5, we can chose to run nmap in one of these timing modes. Each timing mode is interestingly named:

  • (0) Paranoid
  • (1) Sneaky
  • (2) Polite
  • (3) Normal
  • (4) Agressive
  • (5) Insane


Leave a Reply

Your email address will not be published.