If you have not reviewed the Hacker Methodology write up now is a good time to check it out. It will provide you with a much better overview of how we are logically gathering intelligence in order to create a solid basis for the later phases of hacking or penetration testing.
In this overview we’re going to learn about some of the common uses of nmap, go over a few of the switches or options and how they work and then wrap it up with an example of a scan.
Disclaimer: nmap is considered to be recon for further action and can be taken as hostile intent. It’s a grey area between illegal and not, depending on how good of a lawyer you have. I recommend ONLY using this in our Hacker Lab. Used incorrectly it is VERY obvious when you are scanning.