首先打开 /etc/network/interfaces
vi /etc/network/interfaces
首先注释掉 iface eth0 inet dhcp
然后添加下面几行(我要固定的IP地址为192.168.1.100):
iface eth0 inet static
address 192.168.1.110
netmask 255.255.255.0
gateway 192.168.1.1
broadcase 192.168.1.255
修改后的interfaces 文件如下图所示
固定正点原子阿尔法开发板的IP地址
然后打开/etc/rc.local
vi /etc/rc.local
在exit 0前面添加:
/etc/init.d/networking restart
修改后的networking 文件如下图所示:
固定正点原子阿尔法开发板的IP地址

重启后便会发现IP地址已经固定为192.168.1.110了

相关文章:

  • 2021-04-30
  • 2021-11-19
  • 2021-06-12
  • 2021-05-26
  • 2021-07-06
  • 2021-04-15
  • 2021-12-29
  • 2022-01-07
猜你喜欢
  • 2021-11-29
  • 2021-11-29
  • 2021-07-14
  • 2021-12-17
  • 2021-05-24
  • 2022-12-23
相关资源
相似解决方案