树莓派Raspberry Pi OS 设置静态ip
方法一(旧版本Raspberry Pi OS)
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.0.101
netmask 255.255.255.0
network 192.168.0.1
gateway 192.168.0.1方法二(新版本Raspberry Pi OS)
interface eth0
static ip_address=192.168.0.103/24
static routers=192.168.0.103重启
Last updated