I recommend pentest.ws for notetaking. The commands below work in the pentest.ws context.
Discovery all living hosts in a subnet:
Enumerate open ports and versions:
Last updated 4 years ago
$ nmap -sn <cidr> -oG - | grep Up | cut -d' ' -f2
$ nmap -sT -O -sV --version-all <cidr>