Scan local network for hosts with nmap
If you want to connect to a computer on your network but don't know the ipaddress, you can use nmap to help you.
nmap -sn 192.168.1.0/24
The above command will conduct a "Ping Scan" on all addresses that start with 192.168.1
.
192.168.1.0/24
is a subnet mask. It takes 24 bits to define the first 3 sections of an ip4 address, so that's what the /24
is all about. Learn more about subnet masks here.