scan for IPs and ports
nmap -PR -oN /tmp/nmap.out 192.168.1.0/24search hosts
nmap -sP 192.168.1.*
nmap -PR -oN /tmp/nmap.out 192.168.1.0/24scan for open ports
# TCP
nmap -T4 -sS
# UDP
nmap -T4 -sUget more detailed information
sudo nmap -O 192.168.1.100 -T4scan one port
nmap -sV -P0 -p 22 -vv 192.168.1.100
Links
http://linuxwiki.de/nmap