1. 程式人生 > >在樹莓派上設定無線靜態IP

在樹莓派上設定無線靜態IP

修改檔案: /etc/network/interfaces,命令如下

sudo nano /etc/network/interfaces

將最後一句iface default inet dhcp,替換成:

iface default inet static
address 172.xx.xxx.186
netmask 255.255.255.0
gateway 172..xx.xxx.254
dns-nameservers 172..xx.xxx.2
最後Ctrl+O 存檔  Ctrl+X 退出,然後重啟網路:

sudo /etc/init.d/networking restart