Independent & educational platform Not a government body. No link or affiliation with any government organisation. Made for learning only. Test only systems you own or are authorised to test. Become a Partner or Sponsor → Full disclaimer
Network scanningPort scanning & service discovery beginner LinuxWindowsmacOSBSD

Nmap

Nmap maps which hosts are alive on a network and which TCP/UDP services they expose, including software versions and operating-system hints.

Legal & ethical use. Nmap itself documents that scanning networks you do not own may be unwelcome or illegal. The Nmap project hosts scanme.nmap.org specifically for light, polite test scans. Use this tool only on systems, networks and data that you own or have explicit written permission to test. Unauthorised access or scanning can break computer-misuse laws (for example Pakistan's Prevention of Electronic Crimes Act, 2016, and equivalents elsewhere). Practise in your own lab or in authorised environments such as CTFs.

What it is used for

  • Inventory the services running in your own lab or company network
  • Check that a firewall change really closed a port
  • Find forgotten internet-facing services during an authorised assessment

Key features

  • Host discovery and port scanning
  • Service and version detection (-sV)
  • OS fingerprinting
  • Nmap Scripting Engine (NSE) for extra checks

Installation

Linux: install from your distribution (for example `sudo apt install nmap`). Windows/macOS: use the installers on nmap.org/download.

Beginner usage guide

Start with a ping/host-discovery sweep of your lab subnet, then run a service-version scan against the hosts you found and read the output line by line: each open port shows its state, protocol and (with -sV) the detected product.

Example commands

Run these only against your own lab or authorised targets. Placeholder addresses such as 192.0.2.x are documentation ranges.

Scan the most common ports and detect versions
nmap -sV --top-ports 100 192.0.2.10

Scans the 100 most common ports on one lab host and tries to identify each service version. 192.0.2.0/24 is a documentation range — replace it with a host you own.

Discover live hosts without port scanning
nmap -sn 192.168.56.0/24

Ping sweep of a lab subnet; lists hosts that respond.

Keep learning

📘 Networking Fundamentals for Cybersecurity
📘 Introduction to Nmap in an Authorized Lab
📘 How to Build a Personal Cybersecurity Lab
🎓 Learning path: Ethical Testing
🎓 Learning path: Networking & Linux

References

Source verification

Last reviewed: 2026-10-27
Links checked over HTTP: 2026-10-27 07:51 UTC — official: 200, docs: 200, repo: 200
Command flags checked against the real binary nmap (Nmap version 7.99 ( https://nmap.org )) on 2026-10-27.

Related tools