NMap(stands for network mapper) is a small utility that has both a command line option called NMap and also a graphical option called Zenmap. It is a free and open source program that is licensed under the GNU GPL(more details on the GNU GPL license can be found in my introduction to Linux).
Why do you need a network scanner?
Network scanning can be very useful in the IT world and can help you:
Make an inventory of devices on your network
Test security of your network or devices
Troubleshoot network issues
Why use NMap for network scanning?
Can be used for simple and complex network scanning tasks: NMap can be used for just scanning a simple network range to see if devices are connected all the way to in depth port scanning and operating system detection.
Can be integrated into software that you are writing: Because NMap is open source and licensed under the GNU GPL you are able to integrate it into other software that you are creating so if you want your application to be able to scan the network then you can implement NMap code into it(just make sure that you do it so it is compliant with the license).
Cross platform support: NMap works on Linux, Windows, BSD, OSX and more.
It’s free: NMap does not cost anything and you are free to modify the software to your liking, so if you want to extend it you can. (it is used in software too, Spiceworks uses it to do network audits!!)
Documentation: NMap is a popular utility and it has been quite well documented, you can access the documentation on the NMap website.
NMap in the CLI
Simple network scan
To do a simple network scan that will just run with the options set to default to all IP addresses in a given range you can just run:
As it looks that is scanning all IP addresses on the 192.168.0.0/24 subnet, which means it will scan:
And so on and so on until it reaches