top of page

Top Commands of Nmap

KevinsinghJ
Feb 15, 2025
2 min read

Top Commands of Nmap


Nmap is short for network mapper. It has been the go to tool for network mapping, port scanning and vulnerability checking. Despite being introduced a few decades ago, it is still a hugely popular and sought after tool. In this article we’ll look at some of the useful commands in it.



  1. Scanning a range of IP addresses.

In this command a range of IP addresses will be scanned in one go, which in this case

would be 10.0.2.15 to 10.0.2.30



  1. Scanning a range of IP addresses, excluding host(s)

In this command, a range of IP addresses would be scanned as above command, but in

this example, an IP address would be excluded from the scan.



  1. Scanning IP addresses/hosts from a list

    In this command, scanning would be done on a list of IP addresses/hosts which are saved in a file



  1. Saving Nmap results to a file

Opposite of example 3, through this command, we are able to save scans’ results to a

file. First command is to get it saved in .txt format and second in .xml format.





  1. Scanning all possible ports

        Total number of ports that are available out there would be 65532. In this command, all

these possible ports would be scanned on the specified host.




  1. Scanning of top ports

In this command, top ports would be scanned on the specified host



  1. Identifying open ports on a targeted device

All the opened ports on the host would be shown through this command


  1. Status of a port range

Through this command, specified port range would be showing it’s status on the host



  1. Scanning specific port

This command would be scanning tcp port 80 on the specified host


This command would be scanning udp port 53 on the specified host




  1. Identification of service version

This command would help us in identifying the service version on the specified host



  1. A quicker identification of service version

This command is an alternative to example 10 above, in this it would do the detection

quicker with the help of -T4




  1. CVE Detection

One of Nma[‘s greatest features is its “Nmap Scripting Engine” (better known as NSE).  It comes with a predefined set of scripts and it’ll help in automating system and

vulnerability scans.



Conclusion


Nmap is useful in finding useful information about networks, ports, hosts and operating systems. I’d suggest to better understand and to better utilize this tool's commands, it's best to get more hands on practice on it.



 
 

Recent Posts

See All
Top Linux Commands in 2025

In the ever-evolving world of Linux, mastering the command line remains one of the most powerful ways to boost productivity, streamline system management, and take full control of your operating envir

 
 
My Tailscale Setup

Tailscale - Personal Setup In a modern hybrid work environment, ensuring the right level of access between your devices is crucial for security and productivity. I have come up with this article to ex

 
 
PiHole

In this article, we’ll be outlining on how we can perform the setup of PiHole in Ubuntu and a walkthrough on how it works. PiHole is basically a network-wide ad blocker that works as a DNS sinkhole. I

 
 
  • LinkedIn
bottom of page