⚡ RootAccess

Free resources for security learners
Tutorial

Nmap Beginner Guide: The Most Important Commands for 2026

The exact Nmap commands I use on every TryHackMe machine. Includes a full cheat sheet.

← Back to all articles

Nmap is the first tool every cybersecurity learner needs to master. It's free, powerful, and used in virtually every penetration test. I first used it on TryHackMe and it completely changed how I understood network reconnaissance.

What is Nmap?

Nmap (Network Mapper) is a free, open-source tool for network discovery and security auditing. It tells you what devices are on a network, what ports are open, what services are running, and what operating system a device is running.

Installing Nmap

Kali Linux (already installed)

nmap --version

Ubuntu/Debian

sudo apt install nmap

Windows

Download the installer from nmap.org — free.

The Most Important Nmap Commands

1. Basic Port Scan

nmap 10.10.10.1

Checks the 1000 most common ports. Use this first on any TryHackMe machine.

2. Scan All Ports

nmap -p- 10.10.10.1

Checks all 65,535 ports. Slower but you won't miss anything.

3. Service and Version Detection

nmap -sV 10.10.10.1

Find out exactly what software is running on each open port.

4. OS Detection

nmap -O 10.10.10.1

My personal favorite — tells you what operating system the target is running. Knowing the OS immediately narrows down what exploits might work.

5. The All-in-One Scan

nmap -A 10.10.10.1

Combines OS detection, version detection, scripts, and traceroute. Perfect for CTFs and TryHackMe rooms.

6. Full Recon

nmap -A -p- 10.10.10.1

Complete picture of a target. Slower but thorough.

7. Fast Scan

nmap -F 10.10.10.1

Scans only the 100 most common ports. Quick overview.

8. Save Output to File

nmap -A 10.10.10.1 -oN results.txt

Always save your results — you'll want to refer back to them.

Nmap Cheat Sheet

CommandWhat it Does
nmap <ip>Basic scan (1000 ports)
nmap -p- <ip>Scan all 65,535 ports
nmap -sV <ip>Service/version detection
nmap -O <ip>OS detection
nmap -sC <ip>Default scripts
nmap -A <ip>All of the above combined
nmap -F <ip>Fast scan (100 ports)
nmap -oN file.txt <ip>Save output to file

My Recommended Workflow for TryHackMe

When I start a new TryHackMe machine I always run scans in this order:

Step 1 — Quick overview

nmap -F 10.10.10.1

Step 2 — Full recon

nmap -A -p- 10.10.10.1 -oN full-scan.txt

This two-step approach saves time — the fast scan gives you something to work with immediately while the full scan runs in the background.

Practice Nmap for Free

Legal reminder: Only scan systems you own or have explicit permission to test. Always practice on TryHackMe, HackTheBox, or your own lab VMs.

Disclosure: Some links on this page may be affiliate links. I may earn a small commission if you sign up through them, at no extra cost to you. I only recommend tools I genuinely think are worth it.