This is an old revision of the document!
Nmap is an opensource networking mapping tool frequently used in order to gain an accurate picture of how a network is a setup. It was written by Gordon Lyon and comes preinstalled on many Linux distros including Kali.
The baseline functionality provided by Nmap is port scanning. This allows us to be able to tell what ports are open on our target machine. Nmap can conduct a basic port scan using
nmap 192.168.1.1
This command conducts an SYN scan of the 1000 most commonly used ports on the machine at 192.168.1.1. While this is useful often times you'll want to scan all the ports on the target machine, which can be done using
nmap -p- 192.168.1.1
The '-p-' switch tells Nmap that you want to scan all the ports on the target machine. Both of these examples are SYN scans, which is one of the most popular types of scans that Nmap is capable of due to its speed and its lowered chance of crashing the target machine. That being said there are a variety of different scan types and it is important to be familar with all of them. You can change the scan type using the '-s<X>' switch, where <X> is replaced by the letter denoting the type of scan you wish to conduct.
nmap -sU 192.168.1.1