Alpine 配置静态 IP

Alpine 配置静态 IP

编辑 /etc/network/interfaces 文件

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
  address 192.168.163.5
  netmask 255.255.255.0
  gateway 192.168.163.2

重启网络服务

/etc/init.d/networking restart

查看当前 IP

ip add show eth0

参考链接

https://wiki.alpinelinux.org/wiki/Configure_Networking