默认设置Raspberry Pi/etc/network/interfaces

Luc*_*cas 17 raspberry-pi

我已经更改了设置/etc/network/interfaces但是通过此操作我的互联网不再起作用了.

现在我想要更改它,但我找不到默认设置.

如果您有默认设置,可以将它们放在这里吗?

Fri*_*esh 21

对于我的Raspberry Pi 3B型号,它是

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Run Code Online (Sandbox Code Playgroud)


Cli*_*int 18

这些是我的Raspberry Pi 1的/ etc/network/interfaces(包括WiFi设置)的默认设置:

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Run Code Online (Sandbox Code Playgroud)


hek*_*mgl 8

假设您的路由器上运行了DHCP服务器,我会使用:

# /etc/network/interfaces
auto lo eth0
iface lo inet loopback

iface eth0 inet dhcp
Run Code Online (Sandbox Code Playgroud)

更改文件问题后(以root身份):

/etc/init.d/networking restart
Run Code Online (Sandbox Code Playgroud)