How to find alive hosts in our network
Sometimes I need to know all the alive hosts' IP addresses in the LAN I am connected. The following command will show that information:
$ nmap -n -sP 192.168.10.0/24
Starting Nmap 5.21 ( http://nmap.org ) at 2012-08-05 11:24 BST
Nmap scan report for 192.168.10.1
Host is up (0.00086s latency).
Nmap scan report for 192.168.10.40
Host is up (0.00057s latency).
Nmap scan report for 192.168.10.50
Host is up (0.00056s latency).
Nmap scan report for 192.168.10.100
Host is up (0.00051s latency).
Nmap done: 256 IP addresses (4 hosts up) scanned in 13.44 seconds
The option -sP tells nmap to do a ping scan, that is, to go no further than determining if host ...