Nmap flags are the arguments we specify when calling the programme; for example, -Pn (no ping) prevents nmap from pinging targets. The primary flags of nmap are listed here, along with examples. -p: The -p argument or flag allows you to specify one or more ports or port ranges.