📜  如何在网络窗口上扫描树莓派 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:34.651000             🧑  作者: Mango

代码示例1
install nmap
Find your own computers IP address on the local network
Example IP: 192.168.1.17
Scan for devices with the command
nmap -sn 192.168.1.0/24
The -sn flag is the ping scan flag and the 0/24 represents the whole subnet range
This may take a while
Results will look similar to this:
    Nmap scacn report for hostname (IPaddress)
    Host is up (latency)
    MAC Address: macaddress (Producer)
But if the hostname does not show up you can try using the -A flag
Or a simple solution is to do:
    Power off raspberry pi
    arp -a
    Take a screenshot of the IP addresses on the network
    Plug in raspberry pi
    Get coffee/Go to bathroom/World domination/Call a loved one
    Do arp -a again
    Compare list of IP addresses on network to find the raspberry pi