Nmap Cheat Sheet – Complete List of Commands for N

Nmap Cheat Sheet – Complete List of Commands for Network Scanning

Nmap (Network Mapper) is a powerful tool used for network discovery and security auditing. Whether you’re new to cybersecurity or looking to deepen your skills, Nmap helps you discover open ports, identify services, and assess security vulnerabilities on a network. This guide will walk you through essential Nmap commands, from basic scans to more advanced techniques.

Whether you’re scanning a single device or an entire network, this guide will help you get started with Nmap and explore its full potential.

introduction Nmap

What is Nmap and How Does It Work?

Nmap (Network Mapper) is a powerful tool used for network discovery and security auditing. It works by sending specially crafted packets to a target host and analyzing the responses. Through this, it can detect:

Possible security vulnerabilities

Which ports are open

Which services are running on those ports

What OS the target is using

Read More: Automate Everything on Windows Using WMI

What is Nmap and How Does It Work

Nmap Installation Windows: Linux (Debian/Ubuntu): sudo apt update sudo apt install nmap macOS (with Homebrew): brew install nmap

Read More: Why and How to Disable XMLRPC.php in WordPress for Maximum Security

How to Use Nmap in Kali Linux

Kali Linux is a popular penetration testing distribution, and it comes with Nmap pre-installed.

kali

To get started:

Open the terminal in Kali Linux.

Run a basic scan:

nmap -v scanme.nmap.org

For a more advanced scan with OS detection, version detection, script scanning, and traceroute:

nmap -A -T4 target.com

This will give you comprehensive information about the target including services, OS, and potential vulnerabilities.

Basic Nmap Commands for Beginners

basic nmap commands

CommandDescription
nmap 192.168.1.1   Basic scan of target IP  
nmap -sn 192.168.1.0/24   Ping scan to find live hosts  
nmap -p 80,443 target.com   Scan specific ports  
nmap -sV target.com   Detect service versions  
nmap -O target.com   Detect operating system  
Nmap Commands Host Discovery: nmap -sn 192.168.1.1

Checks if the host is online (ping scan).

Port Scanning: nmap 192.168.1.1

Scans top 1000 common ports.

Specific Port Scan: nmap -p 80,443 192.168.1.1

Scans only port 80 and 443.

Service Detection: nmap -sV 192.168.1.1

Shows which service and version are running on open ports.

OS Detection: nmap -O 192.168.1.1

Tries to guess the target’s operating system.

How to Scan a Website Using Nmap?

To scan a website (like example.com), use:

nmap example.com

To detect services and OS:

nmap -A example.com

To find potential vulnerabilities:

nmap --script vuln example.com Intermediate Level User Topics

how to scan multiple ips

How to Scan Multiple IPs:

nmap 192.168.1.1 192.168.1.2 192.168.1.3

or

nmap 192.168.1.1-50

OS Detection:

nmap -O 192.168.1.1

Find Open Ports:

nmap -p- 192.168.1.1

Stealth Scan:

nmap -sS 192.168.1.1

Live Host Discovery:

nmap -sn 192.168.1.0/24

Nmap NSE Scripts:

nmap --script vuln target.com

Vulnerability Scan:

nmap -sV --script vuln target.com

Firewall Evasion:

nmap -f target.com

Nmap + Metasploit: Export Nmap results:

nmap -oX scan.xml target.com

Then import into Metasploit:

db_import scan.xml

Automate with Cron Jobs:

crontab -e

Add:

0 2 * * * nmap -oN daily_scan.txt 192.168.1.0/24

Scan for CVEs and Exploits: Use scripts or custom NSE:

nmap --script=http-vuln-cve2021-41773.nse target.com

Scan IP Range:

nmap 192.168.1.1-20 Subnet Scan: nmap 192.168.1.0/24 Stealth Scan (SYN Scan): nmap -sS 192.168.1.1 Verbose Output: nmap -v 192.168.1.1 Output to File: nmap -oN result.txt 192.168.1.1 Advanced Nmap Usage Nmap Scripting Engine (NSE): nmap --script vuln 192.168.1.1

Detects common vulnerabilities.

Firewall Evasion: nmap -f 192.168.1.1

Sends fragmented packets to bypass some firewalls.

Aggressive Scan: nmap -A 192.168.1.1

Performs OS detection, version detection, script scanning all in one.

Read More: Fix WMI Provider Host CPU Issues in Windows

Timing Options (Faster or slower scan): nmap -T4 192.168.1.1 Real Use Cases

Checking which devices are connected to your home WiFi

Detecting unauthorized devices in office network

Checking open ports and services of a website

Ethical hacking & penetration testing

Nmap vs Other Tools

tools and purpose

ToolPurpose
Nmap   Network mapping, ports & OS detection  
Zenmap   GUI version of Nmap  
Wireshark   Packet-level traffic analysis  
Nmap vs Wireshark – Which Is Better? Feature   Nmap   Wireshark  
Purpose   Network scanning   Packet sniffing  
GUI   No (but Zenmap exists)   Yes  
Live Capture   No   Yes  
Use Case   Port, OS, vuln detection   Traffic analysis  
Skill Level   Easy to Intermediate   Intermediate to Advanced  

Use both together for deep network insights.

Nmap Cheat Sheet CommandDescription
nmap -sn   Ping Scan – Identifies live hosts in a network  
nmap -sS   SYN Scan (Stealth) – Performs a stealth scan to detect open ports  
nmap -O   OS Detection – Attempts to identify the target’s operating system  
nmap -sV   Service Version Detection – Identifies the version of services running on open ports  
nmap -A   Aggressive Scan – Detects OS, services, versions, and runs scripts  
nmap -p   Specific Port Scan – Scan specific ports (e.g., nmap -p 80,443)  
nmap -oN   Output to File – Saves scan results in a normal output format (e.g., nmap -oN result.txt)  
nmap -p-   Scan All Ports – Scans all 65,535 ports on the target  
nmap -T4   Timing Template – Increases speed of scan (use T1 for slow scans or T5 for very fast)  
nmap -sT   TCP Connect Scan – Performs a full TCP connection to detect open ports  
nmap -sU   UDP Scan – Scans for open UDP ports on the target  
nmap -Pn   No Ping – Skips host discovery, useful when targets do not respond to ICMP requests  
nmap -v   Verbose Output – Provides detailed output during the scan  
nmap -iL   Input from File – Scans a list of IPs from a file  
nmap --script vuln   Vulnerability Scan – Uses Nmap’s NSE (Nmap Scripting Engine) to check for vulnerabilities  
nmap --script=http-vuln-cve2021-41773.nse   CVE Vulnerability Detection – Scans for specific CVE vulnerabilities (e.g., CVE-2021-41773)  
nmap -T0   Extremely Slow Scan – For stealthy and low-profile scanning  
nmap -sN   Null Scan – Sends no flags and is useful for evading certain firewalls  
nmap --reason   Reason for Status – Displays the reason why Nmap marked the port as open or closed  
nmap -6   IPv6 Scan – Scans IPv6 addresses and networks  
nmap -oX   Output in XML format – Saves results in XML format (e.g., nmap -oX result.xml)  
nmap --open   Show Only Open Ports – Displays only the open ports in the results  
nmap --max-retries   Set Max Retries – Limits the number of retries for a port scan  
nmap --script ftp-anon   FTP Anonymous Login – Checks for anonymous login on FTP services  
nmap --traceroute   Traceroute – Performs a traceroute to the target to identify network hops  
nmap -sI   Idle Scan – Stealth scan technique that uses an intermediary host  
nmap -sC   Default Script Scan – Runs a set of default scripts during the scan  
nmap -sF   FIN Scan – Sends a FIN packet to detect open ports, useful against firewalls  
nmap -sX   Xmas Scan – Sends a Christmas Tree packet (all flags set) to identify open ports  
nmap -sA   ACK Scan – Used to map out firewall rules and check if ports are filtered  
nmap -sW   Window Scan – Detects open ports based on TCP window size  
nmap -sM   Maimon Scan – This is a rare scan method that’s useful for bypassing certain firewalls  
nmap --scanflags   Scan flags – Customizes scan flags during the port scan  
nmap -oG   Output in Grepable format – Useful for parsing the results into other tools (e.g., nmap -oG result.gnmap)  
nmap -oA   Output in All Formats – Saves scan results in normal, XML, and grepable formats (e.g., nmap -oA result)  
nmap -p 1-65535   Scan All TCP Ports – Scans all ports from 1 to 65535  
nmap --source-port   Source Port – Changes the source port for the scan to avoid detection  
nmap --data-length   Send Custom Data – Allows you to send a specified number of bytes to each packet  
nmap --randomize-hosts   Randomize Host Scan Order – Randomizes the scanning order for stealth  
nmap -n   Disable DNS Resolution – Prevents Nmap from resolving hostnames to IPs  
nmap -R   Enable DNS Resolution – Forces Nmap to resolve hostnames to IPs  
nmap --exclude   Exclude Hosts – Excludes a set of IPs or ranges from the scan (e.g., nmap --exclude 192.168.1.5)  
nmap --excludefile   Exclude Hosts from a File – Excludes hosts listed in a text file  
nmap -b   FTP Bounce Scan – Bounces the scan through an FTP server  
nmap --top-ports   Scan the Top N Ports – Scans the most common ports (e.g., nmap --top-ports 100)  
nmap --append-output   Appends scan results to an existing file  
nmap --unprivileged   Scan with Low Privileges – Use when scanning on a system with low user privileges  
nmap -v -A   Verbose Aggressive Scan – Combines verbosity and aggressive scanning  
Conclusion

Nmap is a tool used by everyone from beginners to professionals. Whether you’re trying to secure your own network or learning penetration testing, Nmap is the first and strongest step.

Core Nexis Start your decenterlized feature bost your business with NextZen technoloy.

Get Started

Related Posts

Complete Nmap Commands Cheat Sheet 2025 + PDF

Complete Nmap Commands Cheat Sheet 2025 + PDF

Complete Nmap Commands Cheat Sheet 2025 + PDF

0 Comments

48 Comments

Sia

menyala terang says:

I every time spent my half an hour to read this weblog’s posts everyday along with a cup of coffee.

Sia

gg soft says:

whoah this weblog is fantastic i really like studying your articles. Stay up the great work! You recognize, a lot of individuals are searching around for this information, you can help them greatly.

Sia

proxy scaper says:

Greetings! This is my first comment here so I just wanted to give a quick shout out and say I truly enjoy reading through your articles. Can you suggest any other blogs/websites/forums that deal with the same topics? Thanks for your time!

Sia

ulasan pasang iklan rumah online says:

You actually make it seem so easy with your presentation but I find this matter to be really something that I think I would never understand. It seems too complex and very broad for me. I’m looking forward for your next post, I will try to get the hang of it!

Sia

Interior says:

When someone writes an piece of writing he/she keeps the thought of a user in his/her brain that how a user can know it. So that’s why this paragraph is outstdanding.

Sia

Data SDY Lotto says:

Wonderful blog! Do you have any hints for aspiring writers? I’m hoping to start my own site soon but I’m a little lost on everything. Would you recommend starting with a free platform like WordPress or go for a paid option? There are so many options out there that I’m completely confused .. Any recommendations? Kudos!

Sia

Beauty Fashion says:

Good site! I truly love how it is simple on my eyes and the data are well written. I am wondering how I could be notified whenever a new post has been made. I’ve subscribed to your RSS which must do the trick! Have a great day!

Sia

Fitness says:

Thanks for ones marvelous posting! I quite enjoyed reading it, you might be a great author.I will make sure to bookmark your blog and will come back in the foreseeable future. I want to encourage one to continue your great writing, have a nice holiday weekend!

Sia

keberuntungan jadi kesempatan says:

I enjoy what you guys tend to be up too. This type of clever work and reporting! Keep up the superb works guys I’ve added you guys to our blogroll.

Sia

Beauty Fashion says:

very good post, i actually love this website, keep on it

Sia

Appliance Repair Manual says:

Hi every one, here every person is sharing these kinds of knowledge, therefore it’s good to read this blog, and I used to pay a quick visit this blog daily.

Sia

renbridge crypto says:

Do you have any video of that? I’d care to find out more details.

Sia

Appliance Repair Manual says:

Hmm it appears like your website ate my first comment (it was super long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well am an aspiring blog writer but I’m still new to the whole thing. Do you have any points for novice blog writers? I’d genuinely appreciate it.

Sia

Beauty Fashion says:

What i don’t understood is actually how you are not actually much more well-liked than you might be right now. You are very intelligent. You realize therefore significantly relating to this subject, produced me personally consider it from a lot of varied angles. Its like women and men aren’t fascinated unless it is one thing to accomplish with Lady gaga! Your own stuffs great. Always maintain it up!

Sia

Vacuum Cleaner says:

It’s a pity you don’t have a donate button! I’d definitely donate to this fantastic blog! I guess for now i’ll settle for bookmarking and adding your RSS feed to my Google account. I look forward to new updates and will share this blog with my Facebook group. Talk soon!

Sia

penipu says:

I appreciate, lead to I found exactly what I was looking for. You’ve ended my four day long hunt! God Bless you man. Have a nice day. Bye

Sia

Medium Hairstyles says:

I do agree with all of the concepts you’ve introducedon your post. They’re really convincing and will definitely work.Nonetheless, the posts are very brief for newbies.May just you please extend them a bit from subsequent time?Thanks for the post.

Sia

Beauty says:

Spot on with this write-up, I really believe this site needs much more attention. I’ll probably be returning to read through more, thanks for the info!

Sia

Hair Lengths says:

I don’t even know how I ended up here, but I thought this post was great. I do not know who you are but definitely you’re going to a famous blogger if you are not already 😉 Cheers!

Sia

subur88 says:

What’s up to all, the contents existing at this site are truly amazing for people experience, well, keep up the nice work fellows.

Sia

subur88 says:

Greetings! Very useful advice within this post! It’s the little changes that produce the most significant changes. Thanks for sharing!

Sia

subur88 says:

Great beat ! I wish to apprentice while you amend your web site, how could i subscribe for a blog site? The account helped me a acceptable deal. I had been tiny bit acquainted of this your broadcast provided bright clear concept

Sia

apothecary cabinet with drawers says:

whoah this weblog is excellent i love studying your posts. Stay up the good work! You already know, lots of individuals are searching around for this information, you can help them greatly.

Sia

subur88 says:

Hello There. I found your blog using msn. This is an extremely well written article. I will make sure to bookmark it and return to read more of your useful information. Thanks for the post. I will certainly comeback.

Sia

99 names of Allah says:

I’m curious to find out what blog platform you’re working with? I’m having some minor security issues with my latest blog and I would like to find something more secure. Do you have any solutions?

Sia

pishing says:

Interesting blog! Is your theme custom made or did you download it from somewhere? A design like yours with a few simple adjustements would really make my blog stand out. Please let me know where you got your theme. Kudos

Sia

are amur leopards endangered says:

wonderful issues altogether, you simply gained a logo new reader. What may you suggest about your submit that you simply made a few days in the past? Any positive?

Sia

backlink says:

Hello there! I simply would like to give you a big thumbs up for the excellent information you have here on this post. I am coming back to your site for more soon.

Sia

penipu says:

Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You obviously know what youre talking about, why throw away your intelligence on just posting videos to your weblog when you could be giving us something informative to read?

Sia

tình dục trẻ em says:

Thank you, I’ve recently been searching for information about this topic for a long time and yours is the best I have found out so far. However, what concerning the conclusion? Are you sure about the supply?

Sia

subur88 situs slot online says:

Peculiar article, just what I wanted to find.

Sia

toxic backlinks checker says:

Great post, I think blog owners should larn a lot from this weblog its real user pleasant.

Sia

subur88 says:

Every weekend i used to pay a visit this website, as i want enjoyment, for the reason that this this web page conations truly pleasant funny information too.

Sia

tai phim sex hd khong che says:

When I initially left a comment I appear to have clicked on the -Notify me when new comments are added- checkbox and from now on whenever a comment is added I recieve four emails with the same comment. Is there a means you can remove me from that service? Thank you!

Sia

site says:

Right here is the right web site for everyone who really wants to find out about this topic. You realize so much its almost hard to argue with you (not that I personally will need to…HaHa). You definitely put a fresh spin on a subject which has been written about for ages. Wonderful stuff, just great!

Sia

homepage says:

Have you ever considered about adding a little bit more than just your articles? I mean, what you say is important and all. But imagine if you added some great graphics or videos to give your posts more, “pop”! Your content is excellent but with pics and videos, this website could definitely be one of the best in its field. Superb blog!

Sia

tao ế sẵn rồi sợ méo gì nữa says:

Magnificent website. A lot of useful info here. I am sending it to a few buddies ans additionally sharing in delicious. And of course, thanks on your effort!

Sia

web site says:

Wonderful blog! I found it while surfing around on Yahoo News. Do you have any tips on how to get listed in Yahoo News? I’ve been trying for a while but I never seem to get there! Many thanks

Sia

video phim cap 3 full hd says:

Incredible! This blog looks exactly like my old one! It’s on a totally different subject but it has pretty much the same layout and design. Great choice of colors!

Sia

Web Backlinks says:

Spot on with this write-up, I really assume this web site needs much more consideration. I’ll in all probability be again to learn far more, thanks for that info.

Sia

ibet44 login says:

Hi to every single one, it’s in fact a nice for me to pay a visit this website, it consists of useful Information.

Sia

guru traffic says:

Can you tell us more about this? I’d want to find out some additional information.

Sia

situs iklan properti says:

Hello, I think your web site might be having browser compatibility issues. When I take a look at your website in Safari, it looks fine but when opening in I.E., it has some overlapping issues. I merely wanted to give you a quick heads up! Apart from that, fantastic website!

2025-12-11 15:03 点击量:5