Scanning a Network
Sometimes I want to know what systems are online. A handy way to discover that information is with the nmap
command:
nmap -sn ${SUBNET}/24 | grep ’scan report'
Where ${SUBNET}
is the local network subnet.
While the bash history and the Ctrl+R
keyboard shortcut help to reuse the command, I created a scanlan
alias:
alias scanlan="nmap -sn ${SUBNET}/24 | grep 'scan report'"
To be more portable the alias could be converted into a shell script where the script determines the actual subnet. For now the alias is sufficient.
Posted: Usability Tagged: General
Category:Next: Ping by Name — Unknown Host
Previous: Googer Teller