码迷,mamicode.com
首页 > 其他好文 > 详细

树莓派设置静态固定IP

时间:2018-07-14 17:17:00      阅读:176      评论:0      收藏:0      [点我收藏+]

标签:add   nan   less   init   res   固定   art   sid   channel   

 

1.输入命令

sudo nano /etc/network/interfaces

2.打开后是这样:

auto lo
iface lo inet loopback
iface eth0 inet dhcp.

auto wlan0
iface wlan0 inet dhcp

配置静态ip改为

auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.1.114
netmask 255.255.255.0
gateway 192.168.1.1

auto wlan0
iface wlan0 inet static
address 192.168.1.114
netmask 255.255.255.0
gateway 192.168.1.1
wpa-ssid 你的wifi名称
wpa-passphrase 你的wifi密码
wireless-channel 11

3.重启网络

sudo /etc/init.d/networking restart

 

树莓派设置静态固定IP

标签:add   nan   less   init   res   固定   art   sid   channel   

原文地址:https://www.cnblogs.com/xiaozao/p/9310122.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!