在树莓派上设置无线静态IP

修改文件: /etc/network/interfaces,命令如下

sudo nano /etc/network/interfaces

将最后一句iface default inet dhcp,替换成:

iface default inet static
address 192.168.3.0xx
netmask 255.255.255.0
gateway 192.168.3.xxx
dns-nameservers 192.168.3.xxx
最后Ctrl+O 存盘  Ctrl+X 退出,然后重启网络:

sudo /etc/init.d/networking restart

原文地址:https://www.cnblogs.com/jsben/p/4805778.html