Ubuntu server 17.10 中通过修改
/etc/network/interfaces
不起作用,这是因为新版本的Ubuntu中是由
/etc/netplan/01-netcfg.yaml
文件来进行控制
具体格式如下
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp0s3:
dhcp4: yes
dhcp6