我试图将静态 ip 分配给我的树莓计算机,但它在重新启动后没有分配它。我的 /etc/networ/interfaces 文件如下所示:
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
#iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
重新启动并使用 ifconfig 命令后,它显示地址不同。我应该怎么做才能让它从文件中分配数据?