Several ways to find the ip address of raspberry pie

1. Environmental Description

insert image description here


From the figure above, we can see that the Raspberry Pi is connected to the win10 computer through a network cable to share the network of the win10 computer, but it needs to be set up on the computer side to share the network. For the setting method, refer to the following link:
share the network to another computer or Qunhui to access the Internet through a network cable. Note that the sixth step does not need to be done. Finally, the Ethernet must be disabled first and then restarted
.
Win10 shares the network through the network cable,
how to share the computer's wireless (WIFI) network to other devices through the cable

2. How to check the IP address of Raspberry Pi

2.1 When the Raspberry Pi is connected to the screen

2.1.1 Enter hostname -I in the Raspberry Pi terminal

hostname -I

Note: The parameter I of the above hostname command is capitalized , indicatingView all IP addresses on this machine

[root@server-01 ~]# hostname -I
192.168.200.150 172.17.0.1 172.21.0.1 172.19.0.1 172.20.0.1

The parameter i of the hostname command is lowercase , which meansView the network IP address corresponding to the host name

bruce@raspberrypi:~ $ hostname
raspberrypi
bruce@raspberrypi:~ $ hostname -i
127.0.1.1

sudo nano /etc/hosts

will see the following:

127.0.1.1 raspberrypi

In this file, you can see that the default host name of the Raspberry Pi Raspbian system is raspberrypi, so you can modify the host name here, then when the Raspberry Pi is connected to the network, you can use ping raspberrypi.
Host name:
network IP address corresponding to raspberrypi: 127.0.1.1

2.1.2 Enter /sbin/ifconfig in the Raspberry Pi terminal

insert image description here
In the picture, inet addr: 10.23.27.15 is the Raspberry Pi IPv4 address.

2.2 Check the Raspberry Pi address on the win computer

2.2.1 Enter ping raspberrypi -4 in the win computer terminal

ping raspberrypi -4
insert image description here
directly returns the Raspberry Pi ipv4 address: 192.168.0.115,
if the last parameter is not added-4, returns the ipv6 address by default (because the window system has set the ipv6 protocol as the priority protocol);
insert image description here

2.2.2 Use the tool nmap to find out the Raspberry Pi address

2.2.2.1 Install nmap software

Install the nmap software first . For specific methods, please refer to the link:
How to check the IP address of the Raspberry Pi, 3 methods to teach you step by step

2.2.2.2 Find network segment

Because it is connected to the Raspberry Pi with a network cable, it is necessary toethernet adapterView the range of network segments to be retrieved by nmap, as shown in the figure below

insert image description here
Or use the ipconfig /all command to list the status of all adapters,

insert image description here

If the Raspberry Pi is connected to the LAN through WiFi, check the "Wireless LAN Adapter WLAN " .
insert image description here

2.2.2.3 Search network segment

nmap -sn 192.168.0.0/24

insert image description here
Note that many Raspberry Pi MAC Addresses start with B8, but this one is not, so don’t doubt whether it is correct.

Nmap scan report for 192.168.0.112
Host is up (2.2s latency).
MAC Address: B8:27:EB:EA:E0:D4 (Raspberry Pi Foundation)

nmap is a very powerful network scanning and detection tool. For more related content, please refer to:
Detailed explanation of nmap commands
and related videos on station B

Guess you like

Origin blog.csdn.net/u014157109/article/details/128249527