In order to get all hosts on the network run the following command:

arp -a

This works on all OS's and will give you the ip addresses of all hosts on the network like this:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/34c5188a-71cd-4709-ab84-1e41713044c1/Untitled.png