vi /etc/network/interfaces
auto eth0 iface eth0 inet static address 192.168.31.4 netmask 255.255.255.0 gateway 192.168.31.2 dns-nameservers 192.168.31.2 hostname $(hostname)
vi /etc/resolv.conf nameserver 192.168.31.2
重启
/etc/init.d/networking restart
标签:vi,ip,hostname,192.168,etc,31.2,Linux,eth0,Alpine From: https://www.cnblogs.com/thsrite/p/17755074.html